Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

fix(graph): fit the starter tool list after the master merge — traverse_graph reads live relationships, history stays on get_links/get_backlinks

garrytancf4b3c2daf99
diff --git a/docs/guides/temporal-edges.md b/docs/guides/temporal-edges.md
index 3434468834..ebb25f864e 100644
--- a/docs/guides/temporal-edges.md
+++ b/docs/guides/temporal-edges.md
@@ -92,8 +92,9 @@ ends the relationship even if the company page still lists them under `key_peopl
| `as_of: "2022-06-30"` | what was true on that day |
| `during: "2022"` | true at any point in a period (`2022`, `2022-03`, `2021..2023-06`) |
-`get_links` takes all of them plus `link_type`; `get_backlinks` and `traverse_graph`
-take `status` (`live`, `all`) and `as_of`. When a default read leaves relationships
+`get_links` takes all of them plus `link_type`; `get_backlinks` takes `status` (`live`,
+`all`) and `as_of`; `traverse_graph` walks live relationships (read history with
+`get_links` or `get_backlinks`). When a default read leaves relationships
out, the response carries a `former_relationships_hidden` notice with the exact call
that shows them, and `gbrain.temporal` response metadata with the count.
diff --git a/src/core/ops/edge-temporal.ts b/src/core/ops/edge-temporal.ts
index 4706edfafc..3980e82a7d 100644
--- a/src/core/ops/edge-temporal.ts
+++ b/src/core/ops/edge-temporal.ts
@@ -22,8 +22,8 @@ export const TEMPORAL_EDGE_PARAMS: Record<'status' | 'as_of' | 'during', ParamDe
/** Starter-surface (budgeted) forms: live is the default; `all` = history. */
-export const STARTER_STATUS_PARAM: ParamDef = { type: 'string', enum: ['live', 'all'] };
-export const STARTER_AS_OF_PARAM: ParamDef = { type: 'string' };
+export const STARTER_STATUS_PARAM: ParamDef = { type: 'string', enum: ['live', 'all'], description: 'Default live.' };
+export const STARTER_AS_OF_PARAM: ParamDef = { type: 'string', description: 'YYYY-MM-DD' };
/** Validate the temporal params and resolve the effective policy for this call. */
export async function resolveEdgeTemporal(ctx: OperationContext, p: Record<string, unknown>, opName: string): Promise<EdgeTemporalOpts> {
diff --git a/src/core/ops/links.ts b/src/core/ops/links.ts
index 0e001b5a80..49f303bae7 100644
--- a/src/core/ops/links.ts
+++ b/src/core/ops/links.ts
@@ -456,8 +456,6 @@ const traverse_graph: Operation = {
depth: { type: 'number', description: `Max depth (cap ${TRAVERSE_DEPTH_CAP}).` },
link_type: { type: 'string', description: 'Follow only this link type.' },
direction: { type: 'string', description: 'Remote default both.', enum: ['in', 'out', 'both'] },
- status: STARTER_STATUS_PARAM,
- as_of: STARTER_AS_OF_PARAM,
source_id: LINK_SOURCE_ID_PARAM,
all_sources: LINK_ALL_SOURCES_PARAM,
},
diff --git a/test/fixtures/goldens/cli/tools-json.json b/test/fixtures/goldens/cli/tools-json.json
index 7d9251684d..94cf91eeac 100644
--- a/test/fixtures/goldens/cli/tools-json.json
+++ b/test/fixtures/goldens/cli/tools-json.json
@@ -2,8 +2,8 @@
"golden": {
"exitCode": 0,
"stderr": "",
- "stdoutBytes": 198716,
- "stdoutSha256": "bd7322fce920c952cc0f01e8a84e9cc9c773791f710891b68e024b0043a931be",
+ "stdoutBytes": 198558,
+ "stdoutSha256": "57a448886d560a55abd9154819c4b4ed7d2cf6b37dbcf2ca5f1ae916ee2a3285",
"toolNames": [
"remember",
"entity",
@@ -1648,6 +1648,7 @@
"type": "boolean"
},
"as_of": {
+ "description": "YYYY-MM-DD",
"type": "string"
},
"slug": {
@@ -1659,6 +1660,7 @@
"type": "string"
},
"status": {
+ "description": "Default live.",
"enum": [
"live",
"all"
@@ -1696,13 +1698,11 @@
"name": "traverse_graph",
"parameters": {
"all_sources": "boolean?",
- "as_of": "string?",
"depth": "number?",
"direction": "string?",
"link_type": "string?",
"slug": "string",
- "source_id": "string?",
- "status": "string?"
+ "source_id": "string?"
},
"required_scopes": [],
"schema": {
@@ -1711,9 +1711,6 @@
"description": "Same as source_id __all__.",
"type": "boolean"
},
- "as_of": {
- "type": "string"
- },
"depth": {
"description": "Max depth (cap 10).",
"type": "number"
@@ -1738,13 +1735,6 @@
"source_id": {
"description": "One source, or '__all__'.",
"type": "string"
- },
- "status": {
- "enum": [
- "live",
- "all"
- ],
- "type": "string"
}
},
"required": [