@ted-galago/wave-cli 0.1.13 → 0.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +107 -0
- package/dist/index.cjs +840 -4
- package/dist/index.js +837 -1
- package/package.json +1 -1
- package/scripts/verify-dev-api.mjs +214 -0
package/README.md
CHANGED
|
@@ -119,6 +119,18 @@ wave markdown-tree root --tree-view
|
|
|
119
119
|
wave markdown-tree resolve --tool-key projects --node-key tasks --parent-id 123
|
|
120
120
|
wave markdown-tree children --tool-key directory --node-key members --record-id 67
|
|
121
121
|
wave markdown-tree subtree --tool-key knowledge --node-key knowledge --content-type processes --depth 2
|
|
122
|
+
wave osmd tree
|
|
123
|
+
wave osmd read "projects/Wave Tools"
|
|
124
|
+
wave osmd children "projects/Wave Tools"
|
|
125
|
+
wave osmd status "projects/Wave Tools/.agent/notes.md" --parent-ref "projects/Wave Tools"
|
|
126
|
+
wave osmd agent init "projects/Wave Tools"
|
|
127
|
+
wave osmd agent status "projects/Wave Tools" notes.md
|
|
128
|
+
wave osmd agent read "projects/Wave Tools" notes.md
|
|
129
|
+
wave osmd agent create "projects/Wave Tools" notes.md --content "Working notes"
|
|
130
|
+
wave osmd agent append "projects/Wave Tools" log.md --content "Investigated project context"
|
|
131
|
+
wave osmd wiki read index.md
|
|
132
|
+
wave osmd wiki create index.md --content "# Agent Wiki"
|
|
133
|
+
wave osmd wiki update "Agent Wiki/index.md" --file ./agent-wiki-index.md
|
|
122
134
|
wave find "Ted"
|
|
123
135
|
wave open "Ted Martinez"
|
|
124
136
|
wave ls --path "directory/Members/Ted Martinez"
|
|
@@ -286,6 +298,100 @@ Backend error codes are surfaced explicitly from GraphQL `errors[].extensions.co
|
|
|
286
298
|
- `INVALID_SCOPE`
|
|
287
299
|
- `UNSUPPORTED_BRANCH`
|
|
288
300
|
|
|
301
|
+
## OSMD Agent Markdown
|
|
302
|
+
|
|
303
|
+
The `osmd` command group is the write-capable agent interface for the merged OSMD + agent overlay model. Canonical OSMD files are read-only. Agents must write either `.agent` overlay files attached to a canonical OSMD parent, or top-level Agent Wiki files.
|
|
304
|
+
|
|
305
|
+
Commands:
|
|
306
|
+
|
|
307
|
+
- `wave osmd tree [--depth <n>] [--tree-view]`
|
|
308
|
+
- `wave osmd read <path> [--parent-ref <canonicalPath>]`
|
|
309
|
+
- `wave osmd children [path] [--parent-ref <canonicalPath>] [--source canonical_osmd|agent_overlay|agent_wiki]`
|
|
310
|
+
- `wave osmd status <path> [--parent-ref <canonicalPath>]`
|
|
311
|
+
- `wave osmd agent status <parent-ref> <notes.md|log.md>`
|
|
312
|
+
- `wave osmd agent init <parent-ref>`
|
|
313
|
+
- `wave osmd agent read <parent-ref> <notes.md|log.md>`
|
|
314
|
+
- `wave osmd agent create <parent-ref> <notes.md|log.md> (--content <markdown> | --file <path> | stdin)`
|
|
315
|
+
- `wave osmd agent update <parent-ref> <notes.md|log.md> (--content <markdown> | --file <path> | stdin)`
|
|
316
|
+
- `wave osmd agent append <parent-ref> <notes.md|log.md> (--content <markdown> | --file <path> | stdin)`
|
|
317
|
+
- `wave osmd wiki status <path>`
|
|
318
|
+
- `wave osmd wiki read <path>`
|
|
319
|
+
- `wave osmd wiki children [path]`
|
|
320
|
+
- `wave osmd wiki create <path> (--content <markdown> | --file <path> | stdin)`
|
|
321
|
+
- `wave osmd wiki update <path> (--content <markdown> | --file <path> | stdin)`
|
|
322
|
+
- `wave osmd wiki append <path> (--content <markdown> | --file <path> | stdin)`
|
|
323
|
+
|
|
324
|
+
GraphQL mapping:
|
|
325
|
+
|
|
326
|
+
- `osmd status` / `osmd agent status` / `osmd wiki status` -> `agentMarkdownStatus`
|
|
327
|
+
- `osmd read` / `osmd agent read` / `osmd wiki read` -> `agentMarkdownFile`
|
|
328
|
+
- `osmd children` / `osmd wiki children` -> `agentMarkdownChildren`
|
|
329
|
+
- `osmd agent init` -> `initAgentMarkdown`
|
|
330
|
+
- `osmd agent create` / `osmd wiki create` -> `createAgentMarkdownFile`
|
|
331
|
+
- `osmd agent update` / `osmd wiki update` -> `updateAgentMarkdownFile`
|
|
332
|
+
- `osmd agent append` / `osmd wiki append` -> `appendAgentMarkdownFile`
|
|
333
|
+
|
|
334
|
+
Path and permission rules:
|
|
335
|
+
|
|
336
|
+
- Canonical OSMD reads use backend `path` values from tree/status/file responses.
|
|
337
|
+
- Canonical OSMD writes are blocked before mutation when status reports `source: "canonical_osmd"` or `access: "read_only"`.
|
|
338
|
+
- `.agent` commands require a canonical `parent-ref`; the CLI passes it as `parentRef` and never derives storage paths.
|
|
339
|
+
- `.agent` first slice supports only `notes.md` (`read_write`) and `log.md` (`append_only`).
|
|
340
|
+
- `osmd agent init <parent-ref>` is idempotent for default `.agent` files.
|
|
341
|
+
- Agent Wiki command paths may be `index.md`, `log.md`, or `Agent Wiki/index.md`; the CLI normalizes these to backend paths under `Agent Wiki`.
|
|
342
|
+
- Agent Wiki first-slice agents should use `index.md` and `log.md`.
|
|
343
|
+
- Reads never create files.
|
|
344
|
+
- Create/update/append flows call status first and inspect `exists`, `canCreate`, `canUpdate`, `canAppend`, `suggestedAction`, and `errorCode`.
|
|
345
|
+
- `create` fails when `exists` is true.
|
|
346
|
+
- `update` fails when `exists` is false.
|
|
347
|
+
- `append` only proceeds when `canAppend` is true.
|
|
348
|
+
|
|
349
|
+
OSMD command envelopes keep the global CLI envelope and put the file metadata directly in `data`:
|
|
350
|
+
|
|
351
|
+
```json
|
|
352
|
+
{
|
|
353
|
+
"ok": true,
|
|
354
|
+
"command": "osmd.agent.read",
|
|
355
|
+
"status": 200,
|
|
356
|
+
"data": {
|
|
357
|
+
"path": "projects/Wave Tools/.agent/notes.md",
|
|
358
|
+
"source": "agent_overlay",
|
|
359
|
+
"access": "read_write",
|
|
360
|
+
"owner": "atlas",
|
|
361
|
+
"exists": true,
|
|
362
|
+
"parentRef": "projects/Wave Tools",
|
|
363
|
+
"content": "..."
|
|
364
|
+
},
|
|
365
|
+
"error": null,
|
|
366
|
+
"meta": { "requestId": "req_123" }
|
|
367
|
+
}
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
On write preflight errors, `data` contains the status metadata and `error.suggestedAction` mirrors backend guidance:
|
|
371
|
+
|
|
372
|
+
```json
|
|
373
|
+
{
|
|
374
|
+
"ok": false,
|
|
375
|
+
"command": "osmd.agent.update",
|
|
376
|
+
"status": 404,
|
|
377
|
+
"data": {
|
|
378
|
+
"path": "projects/Wave Tools/.agent/notes.md",
|
|
379
|
+
"exists": false,
|
|
380
|
+
"canCreate": true,
|
|
381
|
+
"canUpdate": false,
|
|
382
|
+
"canAppend": false,
|
|
383
|
+
"suggestedAction": "create"
|
|
384
|
+
},
|
|
385
|
+
"error": {
|
|
386
|
+
"code": "agent_file_not_found",
|
|
387
|
+
"message": "Agent markdown file does not exist: projects/Wave Tools/.agent/notes.md",
|
|
388
|
+
"suggestedAction": "create",
|
|
389
|
+
"details": {}
|
|
390
|
+
},
|
|
391
|
+
"meta": { "requestId": "req_124" }
|
|
392
|
+
}
|
|
393
|
+
```
|
|
394
|
+
|
|
289
395
|
## Navigation Shell
|
|
290
396
|
|
|
291
397
|
Primary agent-facing discovery/navigation commands:
|
|
@@ -306,6 +412,7 @@ These wrap backend-owned markdown-tree primitives:
|
|
|
306
412
|
|
|
307
413
|
Discovery, ranking, canonical paths, and narrowing are backend-owned.
|
|
308
414
|
An empty `find` result (`candidates: []`) means no evidence for that exact query/scope, not confirmed global absence.
|
|
415
|
+
`markdownTreeFind` remains canonical-focused. Agent overlay and Agent Wiki files are discoverable through `osmd tree`, `osmd children`, and `osmd status`, not through `find`.
|
|
309
416
|
|
|
310
417
|
Ambiguity contract:
|
|
311
418
|
|