@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
|
@@ -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,125 @@ 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
|
+
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
|
+
|
|
1276
|
+
const wikiLogAppend = runWave(
|
|
1277
|
+
["osmd", "wiki", "append-log", "--content", `CLI live verify log ${verifyStamp}`],
|
|
1201
1278
|
env
|
|
1202
1279
|
);
|
|
1203
|
-
results.push(
|
|
1280
|
+
results.push(wikiLogAppend);
|
|
1204
1281
|
osmdVerificationFailures += recordExactCheck({
|
|
1205
1282
|
lines: osmdVerificationLines,
|
|
1206
|
-
label: "osmd.wiki
|
|
1207
|
-
result:
|
|
1283
|
+
label: "osmd.wiki append-log succeeds after init",
|
|
1284
|
+
result: wikiLogAppend,
|
|
1208
1285
|
ok:
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
missingWikiUpdate.parsed?.data?.exists === false &&
|
|
1215
|
-
missingWikiUpdate.parsed?.data?.canCreate === true,
|
|
1216
|
-
reason: "missing_file_404"
|
|
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"
|
|
1217
1291
|
});
|
|
1218
1292
|
|
|
1293
|
+
if (wikiStatus.parsed?.data?.exists === false) {
|
|
1294
|
+
const missingWikiUpdate = runWave(
|
|
1295
|
+
["osmd", "wiki", "update", "index.md", "--content", "verify missing update"],
|
|
1296
|
+
env
|
|
1297
|
+
);
|
|
1298
|
+
results.push(missingWikiUpdate);
|
|
1299
|
+
osmdVerificationFailures += recordExactCheck({
|
|
1300
|
+
lines: osmdVerificationLines,
|
|
1301
|
+
label: "osmd.wiki update missing file returns 404 metadata",
|
|
1302
|
+
result: missingWikiUpdate,
|
|
1303
|
+
ok:
|
|
1304
|
+
missingWikiUpdate.code === 5 &&
|
|
1305
|
+
missingWikiUpdate.parsed?.ok === false &&
|
|
1306
|
+
missingWikiUpdate.parsed?.status === 404 &&
|
|
1307
|
+
missingWikiUpdate.parsed?.error?.code === "agent_file_not_found" &&
|
|
1308
|
+
missingWikiUpdate.parsed?.error?.suggestedAction === "create" &&
|
|
1309
|
+
missingWikiUpdate.parsed?.data?.exists === false &&
|
|
1310
|
+
missingWikiUpdate.parsed?.data?.canCreate === true &&
|
|
1311
|
+
missingWikiUpdate.parsed?.data?.canUpdate === false &&
|
|
1312
|
+
missingWikiUpdate.parsed?.data?.suggestedAction === "create",
|
|
1313
|
+
reason: "missing_file_404"
|
|
1314
|
+
});
|
|
1315
|
+
} else {
|
|
1316
|
+
osmdVerificationLines.push(
|
|
1317
|
+
"PASS | status=n/a | err=skipped_existing_index | reason=missing_file_404_skipped | osmd.wiki update missing file returns 404 metadata"
|
|
1318
|
+
);
|
|
1319
|
+
}
|
|
1320
|
+
|
|
1219
1321
|
const parentRef = resolveOsmdAgentParentRef();
|
|
1220
1322
|
if (!parentRef) {
|
|
1221
1323
|
osmdVerificationLines.push(
|
|
@@ -1247,8 +1349,8 @@ function runOsmdLiveVerification() {
|
|
|
1247
1349
|
result: agentInit,
|
|
1248
1350
|
ok:
|
|
1249
1351
|
agentInit.parsed?.ok === true &&
|
|
1250
|
-
initFiles.some((file) => file?.path?.endsWith("/.agent/notes.md"))
|
|
1251
|
-
|
|
1352
|
+
(initFiles.some((file) => file?.path?.endsWith("/.agent/notes.md")) ||
|
|
1353
|
+
agentInit.parsed?.data?.path?.endsWith("/.agent/notes.md")),
|
|
1252
1354
|
reason: "agent_overlay_init"
|
|
1253
1355
|
});
|
|
1254
1356
|
|