@ted-galago/wave-cli 0.1.17 → 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 +5 -0
- package/dist/index.cjs +14 -1
- package/dist/index.js +14 -1
- package/package.json +1 -1
- package/scripts/verify-dev-api.mjs +52 -13
package/README.md
CHANGED
|
@@ -129,6 +129,7 @@ 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
131
|
wave osmd wiki read log.md
|
|
132
|
+
wave osmd wiki init
|
|
132
133
|
wave osmd wiki create index.md --content "# Agent Wiki"
|
|
133
134
|
wave osmd wiki update "Agent Wiki/index.md" --file ./agent-wiki-index.md
|
|
134
135
|
wave osmd wiki append-log --content "Observed durable event"
|
|
@@ -315,6 +316,7 @@ Commands:
|
|
|
315
316
|
- `wave osmd agent create <parent-ref> notes.md (--content <markdown> | --file <path> | stdin)`
|
|
316
317
|
- `wave osmd agent update <parent-ref> notes.md (--content <markdown> | --file <path> | stdin)`
|
|
317
318
|
- `wave osmd wiki status <path>`
|
|
319
|
+
- `wave osmd wiki init`
|
|
318
320
|
- `wave osmd wiki read <path>`
|
|
319
321
|
- `wave osmd wiki children [path]`
|
|
320
322
|
- `wave osmd wiki create <path> (--content <markdown> | --file <path> | stdin)`
|
|
@@ -327,6 +329,7 @@ GraphQL mapping:
|
|
|
327
329
|
- `osmd read` / `osmd agent read` / `osmd wiki read` -> `agentMarkdownFile`
|
|
328
330
|
- `osmd children` / `osmd wiki children` -> `agentMarkdownChildren`
|
|
329
331
|
- `osmd agent init` -> `initAgentMarkdown`
|
|
332
|
+
- `osmd wiki init` -> `initAgentMarkdown` with backend path `Agent Wiki`
|
|
330
333
|
- `osmd agent create` / `osmd wiki create` -> `createAgentMarkdownFile`
|
|
331
334
|
- `osmd agent update` / `osmd wiki update` -> `updateAgentMarkdownFile`
|
|
332
335
|
- `osmd wiki append-log` -> `recordAgentMarkdownLog`
|
|
@@ -341,6 +344,7 @@ Path and permission rules:
|
|
|
341
344
|
- Agent Wiki index paths may be `index.md` or `Agent Wiki/index.md`; the CLI normalizes these to `Agent Wiki/index.md`.
|
|
342
345
|
- Agent Wiki log paths may be `log.md` or `Agent Wiki/log.md`; the CLI normalizes these to `Agent Wiki/log.md`.
|
|
343
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`.
|
|
344
348
|
- Agent Wiki `create` and `update` support only `index.md`; `log.md` cannot be overwritten.
|
|
345
349
|
- Agent Wiki `append-log` supports only `log.md` and calls status first before appending.
|
|
346
350
|
- The CLI uses backend GraphQL metadata directly and does not derive S3 paths, SHA paths, or backend storage conventions.
|
|
@@ -350,6 +354,7 @@ Path and permission rules:
|
|
|
350
354
|
- `create` fails when `exists` is true.
|
|
351
355
|
- `update` fails when `exists` is false.
|
|
352
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`.
|
|
353
358
|
- Missing `Agent Wiki/index.md` is create-ready when status returns `exists: false`, `canCreate: true`, `canUpdate: false`, and `suggestedAction: "create"`.
|
|
354
359
|
|
|
355
360
|
OSMD command envelopes keep the global CLI envelope and put the file metadata directly in `data`:
|
package/dist/index.cjs
CHANGED
|
@@ -6632,7 +6632,7 @@ function writePreflightError(status, action) {
|
|
|
6632
6632
|
if (!status.exists) {
|
|
6633
6633
|
return {
|
|
6634
6634
|
code: "agent_file_not_found",
|
|
6635
|
-
message: `Agent markdown file does not exist: ${status.path}`,
|
|
6635
|
+
message: status.suggestedAction === "init" ? `Agent Wiki log is not initialized. Run wave osmd wiki init before append-log.` : `Agent markdown file does not exist: ${status.path}`,
|
|
6636
6636
|
suggestedAction: status.suggestedAction,
|
|
6637
6637
|
status: 404
|
|
6638
6638
|
};
|
|
@@ -6891,6 +6891,19 @@ function registerOsmdCommands(program) {
|
|
|
6891
6891
|
}
|
|
6892
6892
|
);
|
|
6893
6893
|
const wiki = osmd.command("wiki").description("Agent Wiki files writable by agents; supports index.md and append-only log.md");
|
|
6894
|
+
wiki.command("init").description("Idempotently initialize Agent Wiki system files").action(async function() {
|
|
6895
|
+
const { organizationId, runtimeOptions } = await resolveOsmdContext(this);
|
|
6896
|
+
return runAgentMarkdownMutation({
|
|
6897
|
+
command: "osmd.wiki.init",
|
|
6898
|
+
operationName: "InitAgentMarkdown",
|
|
6899
|
+
runtimeOptions,
|
|
6900
|
+
field: "init_agent_markdown",
|
|
6901
|
+
variables: {
|
|
6902
|
+
organization_id: organizationId,
|
|
6903
|
+
path: "Agent Wiki"
|
|
6904
|
+
}
|
|
6905
|
+
});
|
|
6906
|
+
});
|
|
6894
6907
|
wiki.command("status <path>").description("Show Agent Wiki index.md or log.md metadata without creating files").action(async (path, _opts, cmd) => {
|
|
6895
6908
|
const { organizationId, runtimeOptions } = await resolveOsmdContext(cmd);
|
|
6896
6909
|
const result = await requestAgentMarkdownStatus({
|
package/dist/index.js
CHANGED
|
@@ -6631,7 +6631,7 @@ function writePreflightError(status, action) {
|
|
|
6631
6631
|
if (!status.exists) {
|
|
6632
6632
|
return {
|
|
6633
6633
|
code: "agent_file_not_found",
|
|
6634
|
-
message: `Agent markdown file does not exist: ${status.path}`,
|
|
6634
|
+
message: status.suggestedAction === "init" ? `Agent Wiki log is not initialized. Run wave osmd wiki init before append-log.` : `Agent markdown file does not exist: ${status.path}`,
|
|
6635
6635
|
suggestedAction: status.suggestedAction,
|
|
6636
6636
|
status: 404
|
|
6637
6637
|
};
|
|
@@ -6890,6 +6890,19 @@ function registerOsmdCommands(program) {
|
|
|
6890
6890
|
}
|
|
6891
6891
|
);
|
|
6892
6892
|
const wiki = osmd.command("wiki").description("Agent Wiki files writable by agents; supports index.md and append-only log.md");
|
|
6893
|
+
wiki.command("init").description("Idempotently initialize Agent Wiki system files").action(async function() {
|
|
6894
|
+
const { organizationId, runtimeOptions } = await resolveOsmdContext(this);
|
|
6895
|
+
return runAgentMarkdownMutation({
|
|
6896
|
+
command: "osmd.wiki.init",
|
|
6897
|
+
operationName: "InitAgentMarkdown",
|
|
6898
|
+
runtimeOptions,
|
|
6899
|
+
field: "init_agent_markdown",
|
|
6900
|
+
variables: {
|
|
6901
|
+
organization_id: organizationId,
|
|
6902
|
+
path: "Agent Wiki"
|
|
6903
|
+
}
|
|
6904
|
+
});
|
|
6905
|
+
});
|
|
6893
6906
|
wiki.command("status <path>").description("Show Agent Wiki index.md or log.md metadata without creating files").action(async (path, _opts, cmd) => {
|
|
6894
6907
|
const { organizationId, runtimeOptions } = await resolveOsmdContext(cmd);
|
|
6895
6908
|
const result = await requestAgentMarkdownStatus({
|
package/package.json
CHANGED
|
@@ -1228,27 +1228,66 @@ function runOsmdLiveVerification() {
|
|
|
1228
1228
|
reason: "agent_wiki_log_read"
|
|
1229
1229
|
});
|
|
1230
1230
|
|
|
1231
|
+
if (wikiLogStatus.parsed?.data?.exists === false) {
|
|
1232
|
+
const missingWikiLogAppend = runWave(
|
|
1233
|
+
["osmd", "wiki", "append-log", "--content", `CLI live verify log ${verifyStamp}`],
|
|
1234
|
+
env
|
|
1235
|
+
);
|
|
1236
|
+
results.push(missingWikiLogAppend);
|
|
1237
|
+
osmdVerificationFailures += recordExactCheck({
|
|
1238
|
+
lines: osmdVerificationLines,
|
|
1239
|
+
label: "osmd.wiki append-log missing log returns init guidance",
|
|
1240
|
+
result: missingWikiLogAppend,
|
|
1241
|
+
ok:
|
|
1242
|
+
missingWikiLogAppend.parsed?.ok === false &&
|
|
1243
|
+
missingWikiLogAppend.parsed?.status === 404 &&
|
|
1244
|
+
missingWikiLogAppend.parsed?.error?.code === "agent_file_not_found" &&
|
|
1245
|
+
missingWikiLogAppend.parsed?.error?.suggestedAction === "init" &&
|
|
1246
|
+
String(missingWikiLogAppend.parsed?.error?.message ?? "").includes("wave osmd wiki init") &&
|
|
1247
|
+
missingWikiLogAppend.parsed?.data?.path === "Agent Wiki/log.md" &&
|
|
1248
|
+
missingWikiLogAppend.parsed?.data?.canAppend === false,
|
|
1249
|
+
reason: "agent_wiki_log_missing_init_guidance"
|
|
1250
|
+
});
|
|
1251
|
+
} else {
|
|
1252
|
+
osmdVerificationLines.push(
|
|
1253
|
+
"PASS | status=n/a | err=skipped_existing_log | reason=missing_log_init_guidance_skipped | osmd.wiki append-log missing log returns init guidance"
|
|
1254
|
+
);
|
|
1255
|
+
}
|
|
1256
|
+
|
|
1257
|
+
const wikiInit = runWave(["osmd", "wiki", "init"], env);
|
|
1258
|
+
results.push(wikiInit);
|
|
1259
|
+
const wikiInitFiles = firstArrayValue(wikiInit.parsed, [["data", "files"]]);
|
|
1260
|
+
osmdVerificationFailures += recordExactCheck({
|
|
1261
|
+
lines: osmdVerificationLines,
|
|
1262
|
+
label: "osmd.wiki init creates Agent Wiki system files",
|
|
1263
|
+
result: wikiInit,
|
|
1264
|
+
ok:
|
|
1265
|
+
wikiInit.parsed?.ok === true &&
|
|
1266
|
+
wikiInitFiles.some(
|
|
1267
|
+
(file) =>
|
|
1268
|
+
file?.path === "Agent Wiki/log.md" &&
|
|
1269
|
+
file?.access === "append_only" &&
|
|
1270
|
+
file?.exists === true &&
|
|
1271
|
+
file?.canAppend === true
|
|
1272
|
+
),
|
|
1273
|
+
reason: "agent_wiki_init"
|
|
1274
|
+
});
|
|
1275
|
+
|
|
1231
1276
|
const wikiLogAppend = runWave(
|
|
1232
1277
|
["osmd", "wiki", "append-log", "--content", `CLI live verify log ${verifyStamp}`],
|
|
1233
1278
|
env
|
|
1234
1279
|
);
|
|
1235
1280
|
results.push(wikiLogAppend);
|
|
1236
|
-
const logAppendAllowed =
|
|
1237
|
-
wikiLogStatus.parsed?.data?.exists === true &&
|
|
1238
|
-
wikiLogStatus.parsed?.data?.access === "append_only" &&
|
|
1239
|
-
wikiLogStatus.parsed?.data?.canAppend === true;
|
|
1240
1281
|
osmdVerificationFailures += recordExactCheck({
|
|
1241
1282
|
lines: osmdVerificationLines,
|
|
1242
|
-
label: "osmd.wiki append-log
|
|
1283
|
+
label: "osmd.wiki append-log succeeds after init",
|
|
1243
1284
|
result: wikiLogAppend,
|
|
1244
|
-
ok:
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
wikiLogAppend.parsed?.data?.canAppend === false,
|
|
1251
|
-
reason: "agent_wiki_log_append"
|
|
1285
|
+
ok:
|
|
1286
|
+
wikiLogAppend.parsed?.ok === true &&
|
|
1287
|
+
wikiLogAppend.parsed?.data?.path === "Agent Wiki/log.md" &&
|
|
1288
|
+
wikiLogAppend.parsed?.data?.access === "append_only" &&
|
|
1289
|
+
wikiLogAppend.parsed?.data?.canAppend === true,
|
|
1290
|
+
reason: "agent_wiki_log_append_after_init"
|
|
1252
1291
|
});
|
|
1253
1292
|
|
|
1254
1293
|
if (wikiStatus.parsed?.data?.exists === false) {
|