You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GET /api/graph/all liefert JEDEN sichtbaren Block (kanonische
Visibility-Triple + Ego-Node-Filter) newest-first mit id-Tiebreak,
dazu induzierte Kanten beider Datenklassen und sichtbare Degrees.
Keine Traversal: das Node-Set ist prädikat-definiert, nicht
erreichbarkeits-definiert — verlinkungsfreie Blöcke und getrennte
Komponenten erscheinen mit, was der Ego-Pfad strukturell nie liefern
kann. Edges/Degrees laufen durch die GETEILTEN SQL-Stages
(egoSQLEdges = Q2/Q2s/Q3 wörtlich): keine zweite Visibility-Wahrheit.
Budgets: limit UND edge_limit defaulten auf ihre Decken (1500 bewiesen
per G39-Bench; 20000 = harte Client-Kante evict §6.6) — ein
4000-Edge-Default würde exakt den Korpus kappen, den der Button zeigen
soll (live heute ~3.8k Links). Ceilings bleiben 400, nie geklemmt; bei
Korpus > Decke bleibt der Endpoint eine budgetierte Sicht
(stats.truncated + budget_report), kein unbegrenzter Dump @1m.
Envelope = Ego-Envelope mit focus:"" (params.hops/per_node_cap echoen
0 = nicht anwendbar); mergeEgo toleriert den leeren Focus (Seed am
Ursprung). SPA: "load all"-Button in der Meta-Row — gleicher
Merge/Settle-Pfad wie expand, Kamera-Reset (Korpus-Sicht, keine
Nachbarschaft), disconnected Nodes lesen hop=Infinity und stehen damit
automatisch vorn in der evict-farthest-first-Ordnung.
Tests: FullGraph-Integrationssuite (Scope-Sichtbarkeit, Kanten nur
zwischen sichtbaren Endpunkten, deterministische newest-first-Kappung,
T07/T6 fail-closed), parseAllParams-Unit-Pins (Ceiling-Defaults,
keine Klemmung, GB5-Partition), fetchGraphAll-Serialisierungs-Pins.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs/api.md
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,7 @@ All endpoints under `/api/*`. Auth via `X-Context-Key` header or `Authorization:
10
10
|`POST /api/store`| Upsert (embedding async via scheduler). Optional `sensitivity` (`credentials`\|`personal`\|`internal`\|`public`) classifies the block manually (`sensitivity_source='manual'`); absent ⇒ settings key `pool.default_block_sensitivity` (fail-closed `credentials`). On an upsert conflict an explicit value applies upgrade-only — downgrades go through `manage update` with `confirm_sensitivity_downgrade`. A credentials pattern in the content forces `credentials` upgrade-only regardless of the requested level (G40 detector, `sensitivity_source='pattern'`). Optional `type` validates against the registry and sets `type_source='manual'`. |
11
11
|`POST /api/search`| Lightweight search (no LLM). Results carry the type axes (`type`/`lifecycle_state`/`type_source`). Optional `types` / `types_exclude` arrays are server-side opt-in type filters (bind parameters; `block_roles_exclude` = legacy alias, both ⇒ union). |
12
12
|`GET /api/graph/ego`| Scope-filtered k-hop ego subgraph over dream links (read-only, no LLM — see [Graph API](#graph-api)). |
13
+
|`GET /api/graph/all`| Flat load-all seed: every visible block up to the budget ceilings (newest-first, deterministic), induced edges of both data classes, degrees. Same envelope as ego with `focus:""`; no traversal params (see [Load-all](#load-all-flat-corpus-seed)). |
|`POST /api/synthesize/daily`| Manual trigger of the daily synthesis (Tagesbericht) for the caller's `home_scope` — the same `GenerateDailyReport` path the 03:00 scheduler iteration runs (digest role, constant internal). Concurrency cap 1 per principal (429 fail-fast), dispatch-interactive (429 + `Retry-After` on capacity rejection). Optional `?date=YYYY-MM-DD` (M103) re-synthesizes the report titled that day over its historical window `[date-1 03:00 UTC, date 03:00 UTC)` — the backfill path; the `(category, title, scope)` upsert replaces the old report in place (same block id, embedding regenerates). A malformed date or a window that has not closed yet ⇒ 400. `{ok, block_id, scope[, date][, reason:"no_activity"]}`. |
15
16
|`GET /api/whoami`| Calling key's identity: `label`, `home_scope`, `read_scopes`, the server-global `admin` tier flag, plus the Model-C tenant identity `tenant_id` + per-tenant `role` (`owner`/`admin`/`member`), and the feature-flag bag `capabilities` (`{workflow: true}` since v4.3.0 — switches the SPA's issues/board surface visible; the field is data, so a later per-tenant gate only changes the value, not the SPA). The SPA login gate probes it, derives its read-only degradation from `admin`, and tells server-admin from tenant-admin. |
@@ -214,6 +215,12 @@ Since the graph-budget wave the envelope also carries `budget_report` — the ty
214
215
215
216
**Security semantics.** The visibility triple (not archived, block type on the registry visibility allowlist, scope readable by the key) is applied inside every hop AND inside the per-node cap legs — a node reachable only through a foreign private bridge is never delivered, and invisible edges never consume cap slots. `degree` counts only visible neighbors (scan budget 1000 raw edges/direction). "Does not exist" and "not visible" answer with an identical `404` (no existence oracle); only successful calls write an access-log row (`action='graph'`, `block_id=NULL`).
216
217
218
+
### Load-all (flat corpus seed)
219
+
220
+
`GET /api/graph/all` returns the flat "load all" seed behind the SPA button of the same name: **every visible block** (canonical visibility triple + the ego node filters), newest-first with an id tiebreak so truncation is deterministic, plus the induced edges of both data classes and the visible degrees. Nothing is traversed — the node set is predicate-defined, not reachability-defined, so blocks without any link (and disconnected components) appear too.
221
+
222
+
Params are the ego set MINUS `block`/`hops`/`per_node_cap`: `limit` (default **1500** = the ceiling — the button's whole point), `edge_limit` (default **20000** = the ceiling, matching the client's hard edge budget), `min_confidence`, `link_class` (same unified GB5 channel), `category`, `created_after`/`created_before`. Ceilings are still enforced, never clamped; the corpus growing past a ceiling reports as `stats.truncated` + `budget_report` limits (`node_limit_reached`/`edge_limit_reached`) — the endpoint stays a budgeted view at 1M+, never an unbounded dump. Response: the ego envelope verbatim with `focus:""` and `params.hops`/`params.per_node_cap` echoed as 0 (not applicable). Same auth, same `graph` rate-limit bucket; there is no focus, hence no 404 arm.
223
+
217
224
### Overview (cluster "landkarte")
218
225
219
226
`GET /api/graph/overview` returns the cluster supergraph: a few hundred meta-nodes (precomputed Louvain communities over the dream-link graph) with `size`, `top_categories`, a representative block, and aggregated inter-cluster meta-edges. The Louvain rebuild runs offline in the scheduler (`internal/overview`, gonum); the endpoint only reads precomputed tables. Since WF T6 the node set is policy-cut: a block becomes a Louvain node only if its type is on the registry visibility allowlist AND carries `overview.include=true`.
0 commit comments