intentional-cognition-os 1.7.0 → 1.8.0
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/CHANGELOG.md +4 -0
- package/README.md +2 -2
- package/dist/index.js +31 -5
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [v1.8.0] - 2026-05-29
|
|
4
|
+
|
|
5
|
+
- feat(cli/audit): add --json mode + CLI handler tests + wire into demo (bvf) (#119) (7c551d5)
|
|
6
|
+
|
|
3
7
|
## [v1.7.0] - 2026-05-29
|
|
4
8
|
|
|
5
9
|
- feat(demo): add scripts/demo-e2e.sh — cross-repo proof-of-work orchestrator (1at) (#118) (aaca71b)
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# intentional-cognition-os v1.
|
|
1
|
+
# intentional-cognition-os v1.8.0
|
|
2
2
|
|
|
3
3
|
Compile knowledge for the machine. Distill understanding for the human.
|
|
4
4
|
|
|
@@ -154,7 +154,7 @@ Global flags on every command: `--workspace <path>`, `--json`, `--verbose`, `--q
|
|
|
154
154
|
|
|
155
155
|
## Status
|
|
156
156
|
|
|
157
|
-
**v1.0.5 — stable.** 1.
|
|
157
|
+
**v1.0.5 — stable.** 1.8.0 tests passing across 5 packages. Used daily by the author. Public release on npm.
|
|
158
158
|
|
|
159
159
|
- **Stable**: all 14 commands, the compilation passes, ask + research + recall + render + promote, the audit chain.
|
|
160
160
|
- **In progress**: post-v1 coverage uplift on compiler + cli packages; mutation-testing baseline.
|
package/dist/index.js
CHANGED
|
@@ -10982,24 +10982,50 @@ function register(program) {
|
|
|
10982
10982
|
}
|
|
10983
10983
|
|
|
10984
10984
|
// src/commands/audit.ts
|
|
10985
|
-
function
|
|
10985
|
+
function runAuditVerify(options, command) {
|
|
10986
10986
|
const global = command.optsWithGlobals();
|
|
10987
|
+
const wantJson = options.json === true || global.json === true;
|
|
10987
10988
|
const wsFlag = options.workspace ?? global.workspace;
|
|
10988
10989
|
const ws = resolveWorkspace(wsFlag !== void 0 ? { workspace: wsFlag } : {});
|
|
10989
10990
|
if (!ws.ok) {
|
|
10990
|
-
|
|
10991
|
+
if (wantJson) {
|
|
10992
|
+
process.stdout.write(
|
|
10993
|
+
JSON.stringify({ ok: false, error: ws.error.message, code: "WORKSPACE_ERROR" }) + "\n"
|
|
10994
|
+
);
|
|
10995
|
+
} else {
|
|
10996
|
+
process.stderr.write(formatError(`Workspace error: ${ws.error.message}
|
|
10991
10997
|
`));
|
|
10998
|
+
}
|
|
10992
10999
|
process.exitCode = 1;
|
|
10993
11000
|
return;
|
|
10994
11001
|
}
|
|
10995
11002
|
const result = verifyAuditChain(ws.value.root);
|
|
10996
11003
|
if (!result.ok) {
|
|
10997
|
-
|
|
11004
|
+
if (wantJson) {
|
|
11005
|
+
process.stdout.write(
|
|
11006
|
+
JSON.stringify({ ok: false, error: result.error.message, code: "VERIFY_FAILED" }) + "\n"
|
|
11007
|
+
);
|
|
11008
|
+
} else {
|
|
11009
|
+
process.stderr.write(formatError(`audit verify failed: ${result.error.message}
|
|
10998
11010
|
`));
|
|
11011
|
+
}
|
|
10999
11012
|
process.exitCode = 1;
|
|
11000
11013
|
return;
|
|
11001
11014
|
}
|
|
11002
11015
|
const v = result.value;
|
|
11016
|
+
if (wantJson) {
|
|
11017
|
+
process.stdout.write(
|
|
11018
|
+
JSON.stringify({
|
|
11019
|
+
ok: v.breaks.length === 0,
|
|
11020
|
+
filesScanned: v.filesScanned,
|
|
11021
|
+
totalEvents: v.totalEvents,
|
|
11022
|
+
cleanFiles: v.cleanFiles,
|
|
11023
|
+
breaks: v.breaks
|
|
11024
|
+
}) + "\n"
|
|
11025
|
+
);
|
|
11026
|
+
process.exitCode = v.breaks.length === 0 ? 0 : 2;
|
|
11027
|
+
return;
|
|
11028
|
+
}
|
|
11003
11029
|
if (v.breaks.length === 0) {
|
|
11004
11030
|
process.stdout.write(formatSuccess(`audit chain OK
|
|
11005
11031
|
`));
|
|
@@ -11031,8 +11057,8 @@ function verifyHandler(options, command) {
|
|
|
11031
11057
|
}
|
|
11032
11058
|
function register2(program) {
|
|
11033
11059
|
const audit = program.command("audit").description("Audit-trail integrity commands");
|
|
11034
|
-
audit.command("verify").description("Walk the audit JSONL hash chain and exit 2 if AUDIT_TAMPERED").option("-w, --workspace <path>", "Workspace path (defaults to ICO_WORKSPACE or cwd)").action((options, command) => {
|
|
11035
|
-
|
|
11060
|
+
audit.command("verify").description("Walk the audit JSONL hash chain and exit 2 if AUDIT_TAMPERED").option("-w, --workspace <path>", "Workspace path (defaults to ICO_WORKSPACE or cwd)").option("--json", "Emit a machine-readable JSON envelope to stdout (no formatted output)").action((options, command) => {
|
|
11061
|
+
runAuditVerify(options, command);
|
|
11036
11062
|
});
|
|
11037
11063
|
}
|
|
11038
11064
|
|