docs: context is the ingest list field everywhere, regenerate the v2 spec (PRO-1618) - #301
SohamRatnaparkhi wants to merge 10 commits into
Conversation
…2 spec (PRO-1618) Copy the spec generated by hydra-db/hydradb-application#1659 (commit 402c706c557b) to api-reference/v2/openapi.json, the same verbatim copy the auto-generate workflow makes. /context/ingest now publishes a `context` form field and marks `items` deprecated. The SDK examples send `context=` / `context:`, and the prose names the `context` form field. `items` is mentioned at most once per page, as the deprecated alias older SDK releases send. Signed-off-by: SohamRatnaparkhi <soham@hydradb.com> Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
✅ OpenHack SummarySecurity review of docs: Confidence Score: 5/5No reportable security findings were detected in this scan. Security merge-readiness rubric: 1 = critical, 2 = high, 3 = medium, 4 = low, 5 = no reportable findings. This score reflects scan findings, not a guarantee of correctness or complete coverage. Files Needing Attention: None Important Files Changed
Last reviewed commit: 8760089 · View review on OpenHack
|
|
… (PRO-1618)
Copy application/docs/openapi.json from hydradb-application staging at
1d405fdf330c (the spec last changed in b8adfeffc7a1) to
api-reference/v2/openapi.json. It publishes `context` as the one list field,
in the JSON body and in the multipart form, with no `items`.
The ingest pages now say what the server does:
- `items` is gone, with no alias; the sentences about older SDK releases
taking it are removed.
- Unknown keys are a 400 that names the key and lists the accepted ones, on
the body, an item, a conversation turn and inside forceful_relations. No
page says they are ignored any more.
- forceful_relations is `{context_ids, properties}`; the properties rules
(flat scalars, 1 KiB, reserved keys) are listed.
- A conversation turn is `{role, content}`. The speaker is the item's
`user_name`, so the examples move the per-turn `name` there. `is_markdown`
is removed.
- title is at most 1,024 bytes; instructions at most 4,000 characters, which
system turns count against when they become the item's instructions.
- The SDK methods take enrich and instructions as form fields; upsert and
enrich on the form accept true, false, 1 or 0 only.
- The hidden split-databases page no longer lists aliases a unified database
accepts; it accepts none.
Signed-off-by: SohamRatnaparkhi <soham@hydradb.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
context is the ingest list field everywhere, regenerate the v2 spec (PRO-1618)context contract, regenerate the v2 spec (PRO-1618)
context contract, regenerate the v2 spec (PRO-1618)context is the ingest list field everywhere, regenerate the v2 spec (PRO-1618)
|
@greptileai review. The one P1 (keep |
… intro (PRO-1618) Ten endpoint pages (Create/List Databases, Database Status and Stats, Ingest Context, List Context, Delete Context, Relations, Subgraph, Query) are written by hand rather than bound to the OpenAPI spec, so the sidebar showed them with no HTTP method. Each now declares its method and path with `api:` frontmatter, and `playground: "none"` so no parameter-less "Try it" panel appears. The Ingest guide's first section said "One call for text and conversations". It now says plainly that each item is a text or a conversation, never both, and one request can carry both kinds. Signed-off-by: SohamRatnaparkhi <soham@hydradb.com> Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Checked each page in docs.json navigation against the Go code on hydradb-application origin/staging and fixed what was untrue or padded. Truth fixes: - /query: max_results maximum is 250 (was 50); mode "auto" does not override graph_context (claims removed); alpha "auto" resolves to 0.8 (advice to use it removed); recency_bias defaults to 0.4; query_apps defaults to true; relation.timestamp examples are whole numbers (Go never prints 1782984600.0) and mean when the relation was introduced. - The shared thinking-mode example: its query path now has no relevance and a narrated path_summary, as thinking-mode query paths do. - Ingest: an omitted context_id is generated from the item's text and title, not the title alone; the quickstart and AGENTS cURL samples put the speaker in item-level user_name instead of a per-turn name (a 400). - Databases: names are up to 255 chars of [a-z0-9_-]; re-creating a failed database needs a delete first; dense/sparse fields cannot be added after creation; real error and success strings throughout. - Connectors, webhooks, BYOG graph collections, access control, status, inspect, list, relations and feedback pages: fields, codes and examples that the server does not produce were corrected. Cleanup: "lane" jargon, filler, repeated paragraphs, spaced hyphens used as dashes, stale Multi-tenant/Metadata link labels, invalid JSON blocks. Signed-off-by: SohamRatnaparkhi <soham@hydradb.com> Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
✅ Mintlify HygieneNo issues found. |
…, Cypher Graph Collections rename (PRO-1618) - api-reference/v2/openapi.json: byte-for-byte copy of the app's application/docs/openapi.json at staging a8a9f5787 (type deprecated on every operation, tenant_id and sub_tenant_id on the unified ingest body, received_at on query chunks). - Query chunks: document received_at (when HydraDB received the item, RFC 3339, not happened_at, omitted when unrecorded) in the Query guide, the Query reference, API results, AGENTS and the CLI page. - Ingest: the 16 MiB body cap (JSON body or the context form field, 413), the tenant_id / sub_tenant_id aliases on the unified body, and a non-string tenancy key being a 400. 413 and meta.api_version on Error Responses. - Rename: the Cypher page is now "Cypher Graph Collections"; "Bring Your Own Graph" is only the ingest graph_payload page. Link text, the MCP graph tools heading and a note on the /byog path updated to match. The Cypher page is in nav, so it is no longer excluded from hygiene. - Replace spaced hyphens used as dashes on visible pages. Signed-off-by: SohamRatnaparkhi <soham@hydradb.com> Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… Own Graph page (PRO-1618) The Query overview's chunk list and the "no source details" rows now name received_at, and the Bring Your Own Graph limits say a JSON body, graph_payload included, is capped at 16 MiB. Signed-off-by: SohamRatnaparkhi <soham@hydradb.com> Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ording (PRO-1618) The ten endpoint pages that carried `api:` plus `playground: "none"` (create/list/status/stats databases, ingest, list, delete, relations, subgraph, query) now use `openapi: "api-reference/v2/openapi.json ..."` like every other endpoint page, so they render the generated request and response sections and the Try it playground. The spec is unchanged: it is byte-identical to app staging. Hand-written parameter and response tables the generated sections now show are removed. Facts the spec does not carry (limits, defaults, name rules, the ingest context fields, Bring Your Own Graph) stay as short notes. Query and List Context keep a hand-written Response section, because the published /query response is a union of the old v2 body and the four-key body. Subgraph's example now uses the query-string form the page is bound to. Every visible page stops calling ingested context "items": the list is `context`, each entry a context. Signed-off-by: SohamRatnaparkhi <soham@hydradb.com> Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…cess (PRO-1618) Signed-off-by: SohamRatnaparkhi <soham@hydradb.com> Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Prose only: code, field names and cookbooks untouched. Connector resources, status results and schema fields are entries, not contexts. Signed-off-by: SohamRatnaparkhi <soham@hydradb.com> Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: SohamRatnaparkhi <soham@hydradb.com> Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
api-reference/v2/openapi.json is now hydradb-application's docs/openapi.docs.json (app PR #1669): /query answers with the typed four-key body, deprecated fields carry the badge and one line, internal fields are hidden, and no page shows Option tabs. temporal_intent is not public, so its rows go; the inspect snippets no longer name a variable item. Signed-off-by: SohamRatnaparkhi <soham@hydradb.com> Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
c8704ee to
8760089
Compare
Signed-off-by: SohamRatnaparkhi <soham@hydradb.com> Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Comments Outside DiffThese findings sit on lines the diff does not cover, so they could not be posted inline. Each one leaves this list once its file changes.
|
|
@greptile-apps On "Feedback constraints were dropped": this is deliberate. |
|
You're right — this is intentional and matches the docs-view design in hydradb-application#1669. The published spec is a rendering-oriented view, while the SDK/server spec retains the |
Stacked on #299.
What
api-reference/v2/openapi.jsonis a verbatim copy ofapplication/docs/openapi.jsonfrom hydra-db/hydradb-applicationstagingat commita8a9f5787fe1f40ffb3c67cd4f3288050feb9208(merge of hydra-db/hydradb-application#1660; the spec file last changed in39a51a48dandef1f3c783), the same copy the auto-generate workflow makes.cmpagainstgit show origin/staging:application/docs/openapi.jsonis clean. It publishescontextas the only ingest list field, in the JSON body and in the multipart form, with noitems.stagingnow (hydra-db/hydradb-application#1653 and its follow-ups, #1655 for relation properties, #1657 and #1660).Contract the pages now describe
contextis the one list name, in the JSON body and the multipart form field.itemsis removed, with no alias, and no page mentions it as accepted.forceful_relationsis a400that names the key and lists the accepted fields. The pages that said unknown keys are ignored or dropped are corrected.forceful_relationsis{ context_ids, properties }.propertiesis a flat map of string, number or boolean values, at most 1 KiB as compact JSON, with no empty key and no reserved key (id,created_at,relation_type,tenant_id,sub_tenant_id).{ role, content }. The speaker is the item'suser_name(default"User"), so the examples move the per-turnnamethere.is_markdownis removed.titleat most 1,024 bytes,instructionsat most 4,000 characters on the request and on each item. A conversation'ssystemturns count against that budget when they become the item's instructions.upsertandenrichaccepttrue,false,1or0; anything else is a400. The SDK methods takeenrichandinstructionsas form fields.context_categorystays undocumented on visible pages.1d405fdf3):typeis published deprecated on every operation and a unified database refusestype: "all"(the docs never teachtype); the unified ingest body acceptstenant_idandsub_tenant_idas deprecated aliases, and a non-string tenancy key is a400; the unified ingest body is capped at 16 MiB (JSON body orcontextform field),413beyond it; query chunks carryreceived_at, when HydraDB received the item (RFC 3339, nothappened_at, omitted when unrecorded).graph_payloadpage (essentials/v2/bring-your-own-graph); Cypher Graph Collections is the Cypher page (essentials/v2/graph-collections-byog). Paths are unchanged.Pages changed
api-reference/v2/endpoint/ingest-context.mdx: examples, SDK param note, item table, limits, unknown-key ruleessentials/v2/ingest.mdx: SDK note, item table, limits, text and conversation examples, declared relations, common mistakesAGENTS.mdx: examples, item table, conversations, limits, SDK sectionapi-reference/v2/sdks.mdx,api-reference/v2/error-responses.mdx,api-reference/v2/endpoint/sources-overview.mdxget-started/v2/quickstart.mdx,get-started/v2/core-concepts.mdxessentials/v2/query.mdx,api-reference/v2/endpoint/query.mdx,essentials/v2/api-results.mdx,plugins/cli.mdx(received_at);essentials/v2/databases-and-collections.mdx(non-string tenancy key);essentials/v2/graph-collections-byog.mdx,essentials/v2/bring-your-own-graph.mdx,plugins/mcp.mdx(rename); spaced hyphens used as dashes replaced on the API reference pages;mintlify-hygiene.tomlno longer excludes the Cypher page, which is in navessentials/v2/split-databases.mdx(a unified database accepts no split aliases),essentials/v2/context-categories.mdx(turnnameexample)Earlier commits on this branch also renamed the SDK examples to
contextacross the other pages.Checks
openapi: "api-reference/v2/openapi.json ..."resolve against the new specnpx mint@latest validate: passednpx mint@latest broken-links: no broken linksmintlify-hygiene check(v0.3.0): no findingsdocs.jsonparses; no em or en dashes addedOnce this lands, close the auto-update PR #297; this PR carries a newer copy of the same file.
🤖 Generated with Claude Code