@ted-galago/wave-cli 0.1.16 → 0.1.18
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 +37 -13
- package/dist/index.cjs +216 -71
- package/dist/index.js +216 -71
- package/package.json +1 -1
- package/scripts/verify-dev-api.mjs +126 -24
package/README.md
CHANGED
|
@@ -128,8 +128,11 @@ wave osmd agent status "projects/Wave Tools" notes.md
|
|
|
128
128
|
wave osmd agent read "projects/Wave Tools" notes.md
|
|
129
129
|
wave osmd agent create "projects/Wave Tools" notes.md --content "Working notes"
|
|
130
130
|
wave osmd wiki read index.md
|
|
131
|
+
wave osmd wiki read log.md
|
|
132
|
+
wave osmd wiki init
|
|
131
133
|
wave osmd wiki create index.md --content "# Agent Wiki"
|
|
132
134
|
wave osmd wiki update "Agent Wiki/index.md" --file ./agent-wiki-index.md
|
|
135
|
+
wave osmd wiki append-log --content "Observed durable event"
|
|
133
136
|
wave find "Ted"
|
|
134
137
|
wave open "Ted Martinez"
|
|
135
138
|
wave ls --path "directory/Members/Ted Martinez"
|
|
@@ -299,7 +302,7 @@ Backend error codes are surfaced explicitly from GraphQL `errors[].extensions.co
|
|
|
299
302
|
|
|
300
303
|
## OSMD Agent Markdown
|
|
301
304
|
|
|
302
|
-
The `osmd` command group is the write-capable agent interface for
|
|
305
|
+
The `osmd` command group is the write-capable agent interface for canonical OSMD, `.agent` overlays, and Agent Wiki files. Canonical OSMD files are read-only. Agents must write either entity-specific `.agent` overlay memory attached to a canonical OSMD parent, or broad Agent Wiki knowledge.
|
|
303
306
|
|
|
304
307
|
Commands:
|
|
305
308
|
|
|
@@ -307,16 +310,18 @@ Commands:
|
|
|
307
310
|
- `wave osmd read <path> [--parent-ref <canonicalPath>]`
|
|
308
311
|
- `wave osmd children [path] [--parent-ref <canonicalPath>] [--source canonical_osmd|agent_overlay|agent_wiki]`
|
|
309
312
|
- `wave osmd status <path> [--parent-ref <canonicalPath>]`
|
|
310
|
-
- `wave osmd agent status <parent-ref>
|
|
313
|
+
- `wave osmd agent status <parent-ref> notes.md`
|
|
311
314
|
- `wave osmd agent init <parent-ref>`
|
|
312
|
-
- `wave osmd agent read <parent-ref>
|
|
313
|
-
- `wave osmd agent create <parent-ref>
|
|
314
|
-
- `wave osmd agent update <parent-ref>
|
|
315
|
+
- `wave osmd agent read <parent-ref> notes.md`
|
|
316
|
+
- `wave osmd agent create <parent-ref> notes.md (--content <markdown> | --file <path> | stdin)`
|
|
317
|
+
- `wave osmd agent update <parent-ref> notes.md (--content <markdown> | --file <path> | stdin)`
|
|
315
318
|
- `wave osmd wiki status <path>`
|
|
319
|
+
- `wave osmd wiki init`
|
|
316
320
|
- `wave osmd wiki read <path>`
|
|
317
321
|
- `wave osmd wiki children [path]`
|
|
318
322
|
- `wave osmd wiki create <path> (--content <markdown> | --file <path> | stdin)`
|
|
319
323
|
- `wave osmd wiki update <path> (--content <markdown> | --file <path> | stdin)`
|
|
324
|
+
- `wave osmd wiki append-log [log.md] (--content <markdown> | --file <path> | stdin)`
|
|
320
325
|
|
|
321
326
|
GraphQL mapping:
|
|
322
327
|
|
|
@@ -324,22 +329,33 @@ GraphQL mapping:
|
|
|
324
329
|
- `osmd read` / `osmd agent read` / `osmd wiki read` -> `agentMarkdownFile`
|
|
325
330
|
- `osmd children` / `osmd wiki children` -> `agentMarkdownChildren`
|
|
326
331
|
- `osmd agent init` -> `initAgentMarkdown`
|
|
332
|
+
- `osmd wiki init` -> `initAgentMarkdown` with backend path `Agent Wiki`
|
|
327
333
|
- `osmd agent create` / `osmd wiki create` -> `createAgentMarkdownFile`
|
|
328
334
|
- `osmd agent update` / `osmd wiki update` -> `updateAgentMarkdownFile`
|
|
335
|
+
- `osmd wiki append-log` -> `recordAgentMarkdownLog`
|
|
329
336
|
|
|
330
337
|
Path and permission rules:
|
|
331
338
|
|
|
332
339
|
- Canonical OSMD reads use backend `path` values from tree/status/file responses.
|
|
333
340
|
- Canonical OSMD writes are blocked before mutation when status reports `source: "canonical_osmd"` or `access: "read_only"`.
|
|
334
341
|
- `.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
|
|
342
|
+
- `.agent` first slice supports only `notes.md`.
|
|
336
343
|
- `osmd agent init <parent-ref>` is idempotent for default `.agent` files.
|
|
337
|
-
- Agent Wiki
|
|
338
|
-
- Agent Wiki
|
|
344
|
+
- Agent Wiki index paths may be `index.md` or `Agent Wiki/index.md`; the CLI normalizes these to `Agent Wiki/index.md`.
|
|
345
|
+
- Agent Wiki log paths may be `log.md` or `Agent Wiki/log.md`; the CLI normalizes these to `Agent Wiki/log.md`.
|
|
346
|
+
- Agent Wiki first-slice agents should use `index.md` for broad writable wiki memory and `log.md` for append-only event memory.
|
|
347
|
+
- Agent Wiki `init` initializes backend-owned system files, including append-only `log.md`, through `initAgentMarkdown` at path `Agent Wiki`.
|
|
348
|
+
- Agent Wiki `create` and `update` support only `index.md`; `log.md` cannot be overwritten.
|
|
349
|
+
- Agent Wiki `append-log` supports only `log.md` and calls status first before appending.
|
|
350
|
+
- The CLI uses backend GraphQL metadata directly and does not derive S3 paths, SHA paths, or backend storage conventions.
|
|
351
|
+
- Atlas should inspect `path`, `source`, `access`, `owner`, `parentRef`, `exists`, `canCreate`, `canUpdate`, `canAppend`, `suggestedAction`, and `errorCode`.
|
|
339
352
|
- Reads never create files.
|
|
340
|
-
- Create/update flows call status first and inspect `exists`, `canCreate`, `canUpdate`, `canAppend`, `suggestedAction`, and `errorCode`.
|
|
353
|
+
- Create/update/append-log flows call status first and inspect `exists`, `canCreate`, `canUpdate`, `canAppend`, `suggestedAction`, and `errorCode`.
|
|
341
354
|
- `create` fails when `exists` is true.
|
|
342
355
|
- `update` fails when `exists` is false.
|
|
356
|
+
- `append-log` fails unless status reports `exists: true`, `access: "append_only"`, and `canAppend: true`.
|
|
357
|
+
- When `Agent Wiki/log.md` is missing and status reports `suggestedAction: "init"`, `append-log` returns a JSON error telling Atlas to run `wave osmd wiki init`.
|
|
358
|
+
- Missing `Agent Wiki/index.md` is create-ready when status returns `exists: false`, `canCreate: true`, `canUpdate: false`, and `suggestedAction: "create"`.
|
|
343
359
|
|
|
344
360
|
OSMD command envelopes keep the global CLI envelope and put the file metadata directly in `data`:
|
|
345
361
|
|
|
@@ -354,6 +370,9 @@ OSMD command envelopes keep the global CLI envelope and put the file metadata di
|
|
|
354
370
|
"access": "read_write",
|
|
355
371
|
"owner": "atlas",
|
|
356
372
|
"exists": true,
|
|
373
|
+
"canCreate": false,
|
|
374
|
+
"canUpdate": true,
|
|
375
|
+
"canAppend": false,
|
|
357
376
|
"parentRef": "projects/Wave Tools",
|
|
358
377
|
"content": "..."
|
|
359
378
|
},
|
|
@@ -367,19 +386,24 @@ On write preflight errors, `data` contains the status metadata and `error.sugges
|
|
|
367
386
|
```json
|
|
368
387
|
{
|
|
369
388
|
"ok": false,
|
|
370
|
-
"command": "osmd.
|
|
389
|
+
"command": "osmd.wiki.update",
|
|
371
390
|
"status": 404,
|
|
372
391
|
"data": {
|
|
373
|
-
"path": "
|
|
392
|
+
"path": "Agent Wiki/index.md",
|
|
393
|
+
"source": "agent_wiki",
|
|
394
|
+
"access": "read_write",
|
|
395
|
+
"owner": "atlas",
|
|
374
396
|
"exists": false,
|
|
375
397
|
"canCreate": true,
|
|
376
398
|
"canUpdate": false,
|
|
377
399
|
"canAppend": false,
|
|
378
|
-
"
|
|
400
|
+
"parentRef": null,
|
|
401
|
+
"suggestedAction": "create",
|
|
402
|
+
"errorCode": null
|
|
379
403
|
},
|
|
380
404
|
"error": {
|
|
381
405
|
"code": "agent_file_not_found",
|
|
382
|
-
"message": "Agent markdown file does not exist:
|
|
406
|
+
"message": "Agent markdown file does not exist: Agent Wiki/index.md",
|
|
383
407
|
"suggestedAction": "create",
|
|
384
408
|
"details": {}
|
|
385
409
|
},
|