@ted-galago/wave-cli 0.1.14 → 0.1.16
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 +102 -0
- package/dist/index.cjs +783 -3
- package/dist/index.js +780 -0
- package/package.json +1 -1
- package/scripts/verify-dev-api.mjs +171 -0
package/README.md
CHANGED
|
@@ -119,6 +119,17 @@ 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 wiki read index.md
|
|
131
|
+
wave osmd wiki create index.md --content "# Agent Wiki"
|
|
132
|
+
wave osmd wiki update "Agent Wiki/index.md" --file ./agent-wiki-index.md
|
|
122
133
|
wave find "Ted"
|
|
123
134
|
wave open "Ted Martinez"
|
|
124
135
|
wave ls --path "directory/Members/Ted Martinez"
|
|
@@ -286,6 +297,96 @@ Backend error codes are surfaced explicitly from GraphQL `errors[].extensions.co
|
|
|
286
297
|
- `INVALID_SCOPE`
|
|
287
298
|
- `UNSUPPORTED_BRANCH`
|
|
288
299
|
|
|
300
|
+
## OSMD Agent Markdown
|
|
301
|
+
|
|
302
|
+
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.
|
|
303
|
+
|
|
304
|
+
Commands:
|
|
305
|
+
|
|
306
|
+
- `wave osmd tree [--depth <n>] [--tree-view]`
|
|
307
|
+
- `wave osmd read <path> [--parent-ref <canonicalPath>]`
|
|
308
|
+
- `wave osmd children [path] [--parent-ref <canonicalPath>] [--source canonical_osmd|agent_overlay|agent_wiki]`
|
|
309
|
+
- `wave osmd status <path> [--parent-ref <canonicalPath>]`
|
|
310
|
+
- `wave osmd agent status <parent-ref> <notes.md|log.md>`
|
|
311
|
+
- `wave osmd agent init <parent-ref>`
|
|
312
|
+
- `wave osmd agent read <parent-ref> <notes.md|log.md>`
|
|
313
|
+
- `wave osmd agent create <parent-ref> <notes.md|log.md> (--content <markdown> | --file <path> | stdin)`
|
|
314
|
+
- `wave osmd agent update <parent-ref> <notes.md|log.md> (--content <markdown> | --file <path> | stdin)`
|
|
315
|
+
- `wave osmd wiki status <path>`
|
|
316
|
+
- `wave osmd wiki read <path>`
|
|
317
|
+
- `wave osmd wiki children [path]`
|
|
318
|
+
- `wave osmd wiki create <path> (--content <markdown> | --file <path> | stdin)`
|
|
319
|
+
- `wave osmd wiki update <path> (--content <markdown> | --file <path> | stdin)`
|
|
320
|
+
|
|
321
|
+
GraphQL mapping:
|
|
322
|
+
|
|
323
|
+
- `osmd status` / `osmd agent status` / `osmd wiki status` -> `agentMarkdownStatus`
|
|
324
|
+
- `osmd read` / `osmd agent read` / `osmd wiki read` -> `agentMarkdownFile`
|
|
325
|
+
- `osmd children` / `osmd wiki children` -> `agentMarkdownChildren`
|
|
326
|
+
- `osmd agent init` -> `initAgentMarkdown`
|
|
327
|
+
- `osmd agent create` / `osmd wiki create` -> `createAgentMarkdownFile`
|
|
328
|
+
- `osmd agent update` / `osmd wiki update` -> `updateAgentMarkdownFile`
|
|
329
|
+
|
|
330
|
+
Path and permission rules:
|
|
331
|
+
|
|
332
|
+
- Canonical OSMD reads use backend `path` values from tree/status/file responses.
|
|
333
|
+
- Canonical OSMD writes are blocked before mutation when status reports `source: "canonical_osmd"` or `access: "read_only"`.
|
|
334
|
+
- `.agent` commands require a canonical `parent-ref`; the CLI passes it as `parentRef` and never derives storage paths.
|
|
335
|
+
- `.agent` first slice supports only `notes.md` (`read_write`) and `log.md` (`append_only`).
|
|
336
|
+
- `osmd agent init <parent-ref>` is idempotent for default `.agent` files.
|
|
337
|
+
- 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`.
|
|
338
|
+
- Agent Wiki first-slice agents should use `index.md` and `log.md`.
|
|
339
|
+
- Reads never create files.
|
|
340
|
+
- Create/update flows call status first and inspect `exists`, `canCreate`, `canUpdate`, `canAppend`, `suggestedAction`, and `errorCode`.
|
|
341
|
+
- `create` fails when `exists` is true.
|
|
342
|
+
- `update` fails when `exists` is false.
|
|
343
|
+
|
|
344
|
+
OSMD command envelopes keep the global CLI envelope and put the file metadata directly in `data`:
|
|
345
|
+
|
|
346
|
+
```json
|
|
347
|
+
{
|
|
348
|
+
"ok": true,
|
|
349
|
+
"command": "osmd.agent.read",
|
|
350
|
+
"status": 200,
|
|
351
|
+
"data": {
|
|
352
|
+
"path": "projects/Wave Tools/.agent/notes.md",
|
|
353
|
+
"source": "agent_overlay",
|
|
354
|
+
"access": "read_write",
|
|
355
|
+
"owner": "atlas",
|
|
356
|
+
"exists": true,
|
|
357
|
+
"parentRef": "projects/Wave Tools",
|
|
358
|
+
"content": "..."
|
|
359
|
+
},
|
|
360
|
+
"error": null,
|
|
361
|
+
"meta": { "requestId": "req_123" }
|
|
362
|
+
}
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
On write preflight errors, `data` contains the status metadata and `error.suggestedAction` mirrors backend guidance:
|
|
366
|
+
|
|
367
|
+
```json
|
|
368
|
+
{
|
|
369
|
+
"ok": false,
|
|
370
|
+
"command": "osmd.agent.update",
|
|
371
|
+
"status": 404,
|
|
372
|
+
"data": {
|
|
373
|
+
"path": "projects/Wave Tools/.agent/notes.md",
|
|
374
|
+
"exists": false,
|
|
375
|
+
"canCreate": true,
|
|
376
|
+
"canUpdate": false,
|
|
377
|
+
"canAppend": false,
|
|
378
|
+
"suggestedAction": "create"
|
|
379
|
+
},
|
|
380
|
+
"error": {
|
|
381
|
+
"code": "agent_file_not_found",
|
|
382
|
+
"message": "Agent markdown file does not exist: projects/Wave Tools/.agent/notes.md",
|
|
383
|
+
"suggestedAction": "create",
|
|
384
|
+
"details": {}
|
|
385
|
+
},
|
|
386
|
+
"meta": { "requestId": "req_124" }
|
|
387
|
+
}
|
|
388
|
+
```
|
|
389
|
+
|
|
289
390
|
## Navigation Shell
|
|
290
391
|
|
|
291
392
|
Primary agent-facing discovery/navigation commands:
|
|
@@ -306,6 +407,7 @@ These wrap backend-owned markdown-tree primitives:
|
|
|
306
407
|
|
|
307
408
|
Discovery, ranking, canonical paths, and narrowing are backend-owned.
|
|
308
409
|
An empty `find` result (`candidates: []`) means no evidence for that exact query/scope, not confirmed global absence.
|
|
410
|
+
`markdownTreeFind` remains canonical-focused. Agent overlay and Agent Wiki files are discoverable through `osmd tree`, `osmd children`, and `osmd status`, not through `find`.
|
|
309
411
|
|
|
310
412
|
Ambiguity contract:
|
|
311
413
|
|