@ted-galago/wave-cli 0.1.15 → 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 +1 -6
- package/dist/index.cjs +0 -51
- package/dist/index.js +0 -51
- package/package.json +1 -1
- package/scripts/verify-dev-api.mjs +0 -43
package/README.md
CHANGED
|
@@ -127,7 +127,6 @@ wave osmd agent init "projects/Wave Tools"
|
|
|
127
127
|
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
|
-
wave osmd agent append "projects/Wave Tools" log.md --content "Investigated project context"
|
|
131
130
|
wave osmd wiki read index.md
|
|
132
131
|
wave osmd wiki create index.md --content "# Agent Wiki"
|
|
133
132
|
wave osmd wiki update "Agent Wiki/index.md" --file ./agent-wiki-index.md
|
|
@@ -313,13 +312,11 @@ Commands:
|
|
|
313
312
|
- `wave osmd agent read <parent-ref> <notes.md|log.md>`
|
|
314
313
|
- `wave osmd agent create <parent-ref> <notes.md|log.md> (--content <markdown> | --file <path> | stdin)`
|
|
315
314
|
- `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
315
|
- `wave osmd wiki status <path>`
|
|
318
316
|
- `wave osmd wiki read <path>`
|
|
319
317
|
- `wave osmd wiki children [path]`
|
|
320
318
|
- `wave osmd wiki create <path> (--content <markdown> | --file <path> | stdin)`
|
|
321
319
|
- `wave osmd wiki update <path> (--content <markdown> | --file <path> | stdin)`
|
|
322
|
-
- `wave osmd wiki append <path> (--content <markdown> | --file <path> | stdin)`
|
|
323
320
|
|
|
324
321
|
GraphQL mapping:
|
|
325
322
|
|
|
@@ -329,7 +326,6 @@ GraphQL mapping:
|
|
|
329
326
|
- `osmd agent init` -> `initAgentMarkdown`
|
|
330
327
|
- `osmd agent create` / `osmd wiki create` -> `createAgentMarkdownFile`
|
|
331
328
|
- `osmd agent update` / `osmd wiki update` -> `updateAgentMarkdownFile`
|
|
332
|
-
- `osmd agent append` / `osmd wiki append` -> `appendAgentMarkdownFile`
|
|
333
329
|
|
|
334
330
|
Path and permission rules:
|
|
335
331
|
|
|
@@ -341,10 +337,9 @@ Path and permission rules:
|
|
|
341
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`.
|
|
342
338
|
- Agent Wiki first-slice agents should use `index.md` and `log.md`.
|
|
343
339
|
- Reads never create files.
|
|
344
|
-
- Create/update
|
|
340
|
+
- Create/update flows call status first and inspect `exists`, `canCreate`, `canUpdate`, `canAppend`, `suggestedAction`, and `errorCode`.
|
|
345
341
|
- `create` fails when `exists` is true.
|
|
346
342
|
- `update` fails when `exists` is false.
|
|
347
|
-
- `append` only proceeds when `canAppend` is true.
|
|
348
343
|
|
|
349
344
|
OSMD command envelopes keep the global CLI envelope and put the file metadata directly in `data`:
|
|
350
345
|
|
package/dist/index.cjs
CHANGED
|
@@ -6544,24 +6544,6 @@ function writePreflightError(status, action) {
|
|
|
6544
6544
|
};
|
|
6545
6545
|
}
|
|
6546
6546
|
}
|
|
6547
|
-
if (action === "append") {
|
|
6548
|
-
if (!status.exists) {
|
|
6549
|
-
return {
|
|
6550
|
-
code: "agent_file_not_found",
|
|
6551
|
-
message: `Agent markdown file does not exist: ${status.path}`,
|
|
6552
|
-
suggestedAction: status.suggestedAction,
|
|
6553
|
-
status: 404
|
|
6554
|
-
};
|
|
6555
|
-
}
|
|
6556
|
-
if (!status.canAppend) {
|
|
6557
|
-
return {
|
|
6558
|
-
code: "append_only_violation",
|
|
6559
|
-
message: `Append is not allowed for ${status.path}.`,
|
|
6560
|
-
suggestedAction: status.suggestedAction,
|
|
6561
|
-
status: 403
|
|
6562
|
-
};
|
|
6563
|
-
}
|
|
6564
|
-
}
|
|
6565
6547
|
return null;
|
|
6566
6548
|
}
|
|
6567
6549
|
function statusCodeForAgentError(code) {
|
|
@@ -6604,10 +6586,6 @@ async function runWriteFlow(params) {
|
|
|
6604
6586
|
update: {
|
|
6605
6587
|
operationName: "UpdateAgentMarkdownFile",
|
|
6606
6588
|
field: "update_agent_markdown_file"
|
|
6607
|
-
},
|
|
6608
|
-
append: {
|
|
6609
|
-
operationName: "AppendAgentMarkdownFile",
|
|
6610
|
-
field: "append_agent_markdown_file"
|
|
6611
6589
|
}
|
|
6612
6590
|
}[params.action];
|
|
6613
6591
|
return runAgentMarkdownMutation({
|
|
@@ -6797,22 +6775,6 @@ function registerOsmdCommands(program) {
|
|
|
6797
6775
|
});
|
|
6798
6776
|
}
|
|
6799
6777
|
);
|
|
6800
|
-
addContentOptions(agent.command("append <parent-ref> <file>")).action(
|
|
6801
|
-
async (parentRef, file, opts, cmd) => {
|
|
6802
|
-
const globals = cmd.optsWithGlobals();
|
|
6803
|
-
const content = await resolveContentInput(opts, globals);
|
|
6804
|
-
const { organizationId, runtimeOptions } = await resolveOsmdContext(cmd);
|
|
6805
|
-
return runWriteFlow({
|
|
6806
|
-
command: "osmd.agent.append",
|
|
6807
|
-
action: "append",
|
|
6808
|
-
runtimeOptions,
|
|
6809
|
-
organizationId,
|
|
6810
|
-
path: normalizeAgentFilePath(file),
|
|
6811
|
-
parentRef: nonEmptyString3.parse(parentRef).trim(),
|
|
6812
|
-
content
|
|
6813
|
-
});
|
|
6814
|
-
}
|
|
6815
|
-
);
|
|
6816
6778
|
const wiki = osmd.command("wiki").description("Agent Wiki files writable by agents; first slice should use index.md and log.md");
|
|
6817
6779
|
wiki.command("status <path>").action(async (path, _opts, cmd) => {
|
|
6818
6780
|
const { organizationId, runtimeOptions } = await resolveOsmdContext(cmd);
|
|
@@ -6892,19 +6854,6 @@ function registerOsmdCommands(program) {
|
|
|
6892
6854
|
content
|
|
6893
6855
|
});
|
|
6894
6856
|
});
|
|
6895
|
-
addContentOptions(wiki.command("append <path>")).action(async (path, opts, cmd) => {
|
|
6896
|
-
const globals = cmd.optsWithGlobals();
|
|
6897
|
-
const content = await resolveContentInput(opts, globals);
|
|
6898
|
-
const { organizationId, runtimeOptions } = await resolveOsmdContext(cmd);
|
|
6899
|
-
return runWriteFlow({
|
|
6900
|
-
command: "osmd.wiki.append",
|
|
6901
|
-
action: "append",
|
|
6902
|
-
runtimeOptions,
|
|
6903
|
-
organizationId,
|
|
6904
|
-
path: normalizeWikiPath(path),
|
|
6905
|
-
content
|
|
6906
|
-
});
|
|
6907
|
-
});
|
|
6908
6857
|
}
|
|
6909
6858
|
|
|
6910
6859
|
// src/cli.ts
|
package/dist/index.js
CHANGED
|
@@ -6543,24 +6543,6 @@ function writePreflightError(status, action) {
|
|
|
6543
6543
|
};
|
|
6544
6544
|
}
|
|
6545
6545
|
}
|
|
6546
|
-
if (action === "append") {
|
|
6547
|
-
if (!status.exists) {
|
|
6548
|
-
return {
|
|
6549
|
-
code: "agent_file_not_found",
|
|
6550
|
-
message: `Agent markdown file does not exist: ${status.path}`,
|
|
6551
|
-
suggestedAction: status.suggestedAction,
|
|
6552
|
-
status: 404
|
|
6553
|
-
};
|
|
6554
|
-
}
|
|
6555
|
-
if (!status.canAppend) {
|
|
6556
|
-
return {
|
|
6557
|
-
code: "append_only_violation",
|
|
6558
|
-
message: `Append is not allowed for ${status.path}.`,
|
|
6559
|
-
suggestedAction: status.suggestedAction,
|
|
6560
|
-
status: 403
|
|
6561
|
-
};
|
|
6562
|
-
}
|
|
6563
|
-
}
|
|
6564
6546
|
return null;
|
|
6565
6547
|
}
|
|
6566
6548
|
function statusCodeForAgentError(code) {
|
|
@@ -6603,10 +6585,6 @@ async function runWriteFlow(params) {
|
|
|
6603
6585
|
update: {
|
|
6604
6586
|
operationName: "UpdateAgentMarkdownFile",
|
|
6605
6587
|
field: "update_agent_markdown_file"
|
|
6606
|
-
},
|
|
6607
|
-
append: {
|
|
6608
|
-
operationName: "AppendAgentMarkdownFile",
|
|
6609
|
-
field: "append_agent_markdown_file"
|
|
6610
6588
|
}
|
|
6611
6589
|
}[params.action];
|
|
6612
6590
|
return runAgentMarkdownMutation({
|
|
@@ -6796,22 +6774,6 @@ function registerOsmdCommands(program) {
|
|
|
6796
6774
|
});
|
|
6797
6775
|
}
|
|
6798
6776
|
);
|
|
6799
|
-
addContentOptions(agent.command("append <parent-ref> <file>")).action(
|
|
6800
|
-
async (parentRef, file, opts, cmd) => {
|
|
6801
|
-
const globals = cmd.optsWithGlobals();
|
|
6802
|
-
const content = await resolveContentInput(opts, globals);
|
|
6803
|
-
const { organizationId, runtimeOptions } = await resolveOsmdContext(cmd);
|
|
6804
|
-
return runWriteFlow({
|
|
6805
|
-
command: "osmd.agent.append",
|
|
6806
|
-
action: "append",
|
|
6807
|
-
runtimeOptions,
|
|
6808
|
-
organizationId,
|
|
6809
|
-
path: normalizeAgentFilePath(file),
|
|
6810
|
-
parentRef: nonEmptyString3.parse(parentRef).trim(),
|
|
6811
|
-
content
|
|
6812
|
-
});
|
|
6813
|
-
}
|
|
6814
|
-
);
|
|
6815
6777
|
const wiki = osmd.command("wiki").description("Agent Wiki files writable by agents; first slice should use index.md and log.md");
|
|
6816
6778
|
wiki.command("status <path>").action(async (path, _opts, cmd) => {
|
|
6817
6779
|
const { organizationId, runtimeOptions } = await resolveOsmdContext(cmd);
|
|
@@ -6891,19 +6853,6 @@ function registerOsmdCommands(program) {
|
|
|
6891
6853
|
content
|
|
6892
6854
|
});
|
|
6893
6855
|
});
|
|
6894
|
-
addContentOptions(wiki.command("append <path>")).action(async (path, opts, cmd) => {
|
|
6895
|
-
const globals = cmd.optsWithGlobals();
|
|
6896
|
-
const content = await resolveContentInput(opts, globals);
|
|
6897
|
-
const { organizationId, runtimeOptions } = await resolveOsmdContext(cmd);
|
|
6898
|
-
return runWriteFlow({
|
|
6899
|
-
command: "osmd.wiki.append",
|
|
6900
|
-
action: "append",
|
|
6901
|
-
runtimeOptions,
|
|
6902
|
-
organizationId,
|
|
6903
|
-
path: normalizeWikiPath(path),
|
|
6904
|
-
content
|
|
6905
|
-
});
|
|
6906
|
-
});
|
|
6907
6856
|
}
|
|
6908
6857
|
|
|
6909
6858
|
// src/cli.ts
|
package/package.json
CHANGED
|
@@ -1269,49 +1269,6 @@ function runOsmdLiveVerification() {
|
|
|
1269
1269
|
reason: "agent_overlay_update"
|
|
1270
1270
|
});
|
|
1271
1271
|
|
|
1272
|
-
const logEntry = `CLI live verify log append ${verifyStamp}`;
|
|
1273
|
-
const agentAppend = runWave(
|
|
1274
|
-
["osmd", "agent", "append", parentRef, "log.md", "--content", logEntry],
|
|
1275
|
-
env
|
|
1276
|
-
);
|
|
1277
|
-
results.push(agentAppend);
|
|
1278
|
-
osmdVerificationFailures += recordExactCheck({
|
|
1279
|
-
lines: osmdVerificationLines,
|
|
1280
|
-
label: `osmd.agent append log parent=${parentRef}`,
|
|
1281
|
-
result: agentAppend,
|
|
1282
|
-
ok:
|
|
1283
|
-
agentAppend.parsed?.ok === true &&
|
|
1284
|
-
agentAppend.parsed?.data?.access === "append_only" &&
|
|
1285
|
-
String(agentAppend.parsed?.data?.content ?? "").includes(logEntry),
|
|
1286
|
-
reason: "agent_overlay_append"
|
|
1287
|
-
});
|
|
1288
|
-
|
|
1289
|
-
const appendRefusal = runWave(
|
|
1290
|
-
[
|
|
1291
|
-
"osmd",
|
|
1292
|
-
"agent",
|
|
1293
|
-
"append",
|
|
1294
|
-
parentRef,
|
|
1295
|
-
"notes.md",
|
|
1296
|
-
"--content",
|
|
1297
|
-
"verify append refusal"
|
|
1298
|
-
],
|
|
1299
|
-
env
|
|
1300
|
-
);
|
|
1301
|
-
results.push(appendRefusal);
|
|
1302
|
-
osmdVerificationFailures += recordExactCheck({
|
|
1303
|
-
lines: osmdVerificationLines,
|
|
1304
|
-
label: `osmd.agent append refuses read_write notes parent=${parentRef}`,
|
|
1305
|
-
result: appendRefusal,
|
|
1306
|
-
ok:
|
|
1307
|
-
appendRefusal.code === 4 &&
|
|
1308
|
-
appendRefusal.parsed?.ok === false &&
|
|
1309
|
-
appendRefusal.parsed?.status === 403 &&
|
|
1310
|
-
appendRefusal.parsed?.error?.code === "append_only_violation" &&
|
|
1311
|
-
appendRefusal.parsed?.error?.suggestedAction === "update" &&
|
|
1312
|
-
appendRefusal.parsed?.data?.canAppend === false,
|
|
1313
|
-
reason: "agent_overlay_append_refusal"
|
|
1314
|
-
});
|
|
1315
1272
|
}
|
|
1316
1273
|
|
|
1317
1274
|
runOsmdLiveVerification();
|