@ted-galago/wave-cli 0.1.15 → 0.1.17
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 +32 -18
- package/dist/index.cjs +174 -93
- package/dist/index.js +174 -93
- package/package.json +1 -1
- package/scripts/verify-dev-api.mjs +88 -68
|
@@ -1172,17 +1172,21 @@ function runOsmdLiveVerification() {
|
|
|
1172
1172
|
reason: "depth_zero_contract"
|
|
1173
1173
|
});
|
|
1174
1174
|
|
|
1175
|
-
const
|
|
1176
|
-
results.push(
|
|
1175
|
+
const wikiStatus = runWave(["osmd", "wiki", "status", "index.md"], env);
|
|
1176
|
+
results.push(wikiStatus);
|
|
1177
1177
|
osmdVerificationFailures += recordExactCheck({
|
|
1178
1178
|
lines: osmdVerificationLines,
|
|
1179
|
-
label: "osmd.wiki
|
|
1180
|
-
result:
|
|
1179
|
+
label: "osmd.wiki status index",
|
|
1180
|
+
result: wikiStatus,
|
|
1181
1181
|
ok:
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1182
|
+
wikiStatus.parsed?.ok === true &&
|
|
1183
|
+
wikiStatus.parsed?.data?.path === "Agent Wiki/index.md" &&
|
|
1184
|
+
wikiStatus.parsed?.data?.source === "agent_wiki" &&
|
|
1185
|
+
(wikiStatus.parsed?.data?.exists !== false ||
|
|
1186
|
+
(wikiStatus.parsed?.data?.canCreate === true &&
|
|
1187
|
+
wikiStatus.parsed?.data?.canUpdate === false &&
|
|
1188
|
+
wikiStatus.parsed?.data?.suggestedAction === "create")),
|
|
1189
|
+
reason: "agent_wiki_index_status"
|
|
1186
1190
|
});
|
|
1187
1191
|
|
|
1188
1192
|
const wikiChildren = runWave(["osmd", "wiki", "children"], env);
|
|
@@ -1195,27 +1199,86 @@ function runOsmdLiveVerification() {
|
|
|
1195
1199
|
reason: "agent_wiki_children"
|
|
1196
1200
|
});
|
|
1197
1201
|
|
|
1198
|
-
const
|
|
1199
|
-
|
|
1200
|
-
|
|
1202
|
+
const wikiLogStatus = runWave(["osmd", "wiki", "status", "log.md"], env);
|
|
1203
|
+
results.push(wikiLogStatus);
|
|
1204
|
+
osmdVerificationFailures += recordExactCheck({
|
|
1205
|
+
lines: osmdVerificationLines,
|
|
1206
|
+
label: "osmd.wiki status append-only log",
|
|
1207
|
+
result: wikiLogStatus,
|
|
1208
|
+
ok:
|
|
1209
|
+
wikiLogStatus.parsed?.ok === true &&
|
|
1210
|
+
wikiLogStatus.parsed?.data?.path === "Agent Wiki/log.md" &&
|
|
1211
|
+
wikiLogStatus.parsed?.data?.source === "agent_wiki" &&
|
|
1212
|
+
wikiLogStatus.parsed?.data?.access === "append_only" &&
|
|
1213
|
+
typeof wikiLogStatus.parsed?.data?.canAppend === "boolean",
|
|
1214
|
+
reason: "agent_wiki_log_status"
|
|
1215
|
+
});
|
|
1216
|
+
|
|
1217
|
+
const wikiLogRead = runWave(["osmd", "wiki", "read", "Agent Wiki/log.md"], env);
|
|
1218
|
+
results.push(wikiLogRead);
|
|
1219
|
+
osmdVerificationFailures += recordExactCheck({
|
|
1220
|
+
lines: osmdVerificationLines,
|
|
1221
|
+
label: "osmd.wiki read append-only log does not create",
|
|
1222
|
+
result: wikiLogRead,
|
|
1223
|
+
ok:
|
|
1224
|
+
wikiLogRead.parsed?.ok === true &&
|
|
1225
|
+
wikiLogRead.parsed?.data?.path === "Agent Wiki/log.md" &&
|
|
1226
|
+
wikiLogRead.parsed?.data?.access === "append_only" &&
|
|
1227
|
+
wikiLogRead.parsed?.data?.exists === wikiLogStatus.parsed?.data?.exists,
|
|
1228
|
+
reason: "agent_wiki_log_read"
|
|
1229
|
+
});
|
|
1230
|
+
|
|
1231
|
+
const wikiLogAppend = runWave(
|
|
1232
|
+
["osmd", "wiki", "append-log", "--content", `CLI live verify log ${verifyStamp}`],
|
|
1201
1233
|
env
|
|
1202
1234
|
);
|
|
1203
|
-
results.push(
|
|
1235
|
+
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;
|
|
1204
1240
|
osmdVerificationFailures += recordExactCheck({
|
|
1205
1241
|
lines: osmdVerificationLines,
|
|
1206
|
-
label: "osmd.wiki
|
|
1207
|
-
result:
|
|
1208
|
-
ok:
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
reason: "missing_file_404"
|
|
1242
|
+
label: "osmd.wiki append-log follows backend canAppend",
|
|
1243
|
+
result: wikiLogAppend,
|
|
1244
|
+
ok: logAppendAllowed
|
|
1245
|
+
? wikiLogAppend.parsed?.ok === true &&
|
|
1246
|
+
wikiLogAppend.parsed?.data?.path === "Agent Wiki/log.md" &&
|
|
1247
|
+
wikiLogAppend.parsed?.data?.access === "append_only"
|
|
1248
|
+
: wikiLogAppend.parsed?.ok === false &&
|
|
1249
|
+
wikiLogAppend.parsed?.data?.path === "Agent Wiki/log.md" &&
|
|
1250
|
+
wikiLogAppend.parsed?.data?.canAppend === false,
|
|
1251
|
+
reason: "agent_wiki_log_append"
|
|
1217
1252
|
});
|
|
1218
1253
|
|
|
1254
|
+
if (wikiStatus.parsed?.data?.exists === false) {
|
|
1255
|
+
const missingWikiUpdate = runWave(
|
|
1256
|
+
["osmd", "wiki", "update", "index.md", "--content", "verify missing update"],
|
|
1257
|
+
env
|
|
1258
|
+
);
|
|
1259
|
+
results.push(missingWikiUpdate);
|
|
1260
|
+
osmdVerificationFailures += recordExactCheck({
|
|
1261
|
+
lines: osmdVerificationLines,
|
|
1262
|
+
label: "osmd.wiki update missing file returns 404 metadata",
|
|
1263
|
+
result: missingWikiUpdate,
|
|
1264
|
+
ok:
|
|
1265
|
+
missingWikiUpdate.code === 5 &&
|
|
1266
|
+
missingWikiUpdate.parsed?.ok === false &&
|
|
1267
|
+
missingWikiUpdate.parsed?.status === 404 &&
|
|
1268
|
+
missingWikiUpdate.parsed?.error?.code === "agent_file_not_found" &&
|
|
1269
|
+
missingWikiUpdate.parsed?.error?.suggestedAction === "create" &&
|
|
1270
|
+
missingWikiUpdate.parsed?.data?.exists === false &&
|
|
1271
|
+
missingWikiUpdate.parsed?.data?.canCreate === true &&
|
|
1272
|
+
missingWikiUpdate.parsed?.data?.canUpdate === false &&
|
|
1273
|
+
missingWikiUpdate.parsed?.data?.suggestedAction === "create",
|
|
1274
|
+
reason: "missing_file_404"
|
|
1275
|
+
});
|
|
1276
|
+
} else {
|
|
1277
|
+
osmdVerificationLines.push(
|
|
1278
|
+
"PASS | status=n/a | err=skipped_existing_index | reason=missing_file_404_skipped | osmd.wiki update missing file returns 404 metadata"
|
|
1279
|
+
);
|
|
1280
|
+
}
|
|
1281
|
+
|
|
1219
1282
|
const parentRef = resolveOsmdAgentParentRef();
|
|
1220
1283
|
if (!parentRef) {
|
|
1221
1284
|
osmdVerificationLines.push(
|
|
@@ -1247,8 +1310,8 @@ function runOsmdLiveVerification() {
|
|
|
1247
1310
|
result: agentInit,
|
|
1248
1311
|
ok:
|
|
1249
1312
|
agentInit.parsed?.ok === true &&
|
|
1250
|
-
initFiles.some((file) => file?.path?.endsWith("/.agent/notes.md"))
|
|
1251
|
-
|
|
1313
|
+
(initFiles.some((file) => file?.path?.endsWith("/.agent/notes.md")) ||
|
|
1314
|
+
agentInit.parsed?.data?.path?.endsWith("/.agent/notes.md")),
|
|
1252
1315
|
reason: "agent_overlay_init"
|
|
1253
1316
|
});
|
|
1254
1317
|
|
|
@@ -1269,49 +1332,6 @@ function runOsmdLiveVerification() {
|
|
|
1269
1332
|
reason: "agent_overlay_update"
|
|
1270
1333
|
});
|
|
1271
1334
|
|
|
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
1335
|
}
|
|
1316
1336
|
|
|
1317
1337
|
runOsmdLiveVerification();
|