@memnexus-ai/mx-agent-cli 0.1.181 → 0.1.182
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.
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* KI-COORDMT-HOOK-EXPORT-ROBUSTNESS — publish-side sha pin for the session-start
|
|
3
|
+
* coordination-brief hook (Red Team v2.41 Step-6 Major).
|
|
4
|
+
*
|
|
5
|
+
* WHY HERE (defense in depth): the CLI publish workflow (mx-agent-cli-publish.yml)
|
|
6
|
+
* triggers on agent-config/** and BUNDLES agent-config/hooks/coordination-brief.sh
|
|
7
|
+
* into the published package (scripts/bundle-config.mjs). Its test gate is the CLI
|
|
8
|
+
* `npm test` suite. Without a pin assertion IN THIS SUITE, a PR that edits only the
|
|
9
|
+
* hook could ship an un-vetted hook in a new CLI even if someone later loosens the
|
|
10
|
+
* coordination-service workflow's path filters. This test makes that impossible:
|
|
11
|
+
* the CLI cannot go green — and therefore cannot publish — with a drifted hook.
|
|
12
|
+
*
|
|
13
|
+
* THREE PIN SITES MUST BUMP TOGETHER when coordination-brief.sh changes:
|
|
14
|
+
* 1. coordination-service/src/__tests__/coordination-brief-drift.test.ts (PINNED_SHA256)
|
|
15
|
+
* 2. cli/src/__tests__/coordination-brief-pin.test.ts (this file)
|
|
16
|
+
* 3. spearmint-private .github/workflows/coordination-hook-pin.yml (PINNED_SHA256)
|
|
17
|
+
* See the drift-test header for the full re-distribution procedure.
|
|
18
|
+
*/
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=coordination-brief-pin.test.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coordination-brief-pin.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/coordination-brief-pin.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* KI-COORDMT-HOOK-EXPORT-ROBUSTNESS — publish-side sha pin for the session-start
|
|
3
|
+
* coordination-brief hook (Red Team v2.41 Step-6 Major).
|
|
4
|
+
*
|
|
5
|
+
* WHY HERE (defense in depth): the CLI publish workflow (mx-agent-cli-publish.yml)
|
|
6
|
+
* triggers on agent-config/** and BUNDLES agent-config/hooks/coordination-brief.sh
|
|
7
|
+
* into the published package (scripts/bundle-config.mjs). Its test gate is the CLI
|
|
8
|
+
* `npm test` suite. Without a pin assertion IN THIS SUITE, a PR that edits only the
|
|
9
|
+
* hook could ship an un-vetted hook in a new CLI even if someone later loosens the
|
|
10
|
+
* coordination-service workflow's path filters. This test makes that impossible:
|
|
11
|
+
* the CLI cannot go green — and therefore cannot publish — with a drifted hook.
|
|
12
|
+
*
|
|
13
|
+
* THREE PIN SITES MUST BUMP TOGETHER when coordination-brief.sh changes:
|
|
14
|
+
* 1. coordination-service/src/__tests__/coordination-brief-drift.test.ts (PINNED_SHA256)
|
|
15
|
+
* 2. cli/src/__tests__/coordination-brief-pin.test.ts (this file)
|
|
16
|
+
* 3. spearmint-private .github/workflows/coordination-hook-pin.yml (PINNED_SHA256)
|
|
17
|
+
* See the drift-test header for the full re-distribution procedure.
|
|
18
|
+
*/
|
|
19
|
+
import { describe, it, expect } from 'vitest';
|
|
20
|
+
import { readFileSync } from 'node:fs';
|
|
21
|
+
import { createHash } from 'node:crypto';
|
|
22
|
+
import { fileURLToPath } from 'node:url';
|
|
23
|
+
import { join, dirname } from 'node:path';
|
|
24
|
+
const here = dirname(fileURLToPath(import.meta.url));
|
|
25
|
+
// cli/src/__tests__ → mx-agent-system/agent-config/hooks/coordination-brief.sh
|
|
26
|
+
const HOOK_FILE = join(here, '..', '..', '..', 'agent-config', 'hooks', 'coordination-brief.sh');
|
|
27
|
+
// Mirror of the platform PINNED_SHA256 (coordination-brief-drift.test.ts). Bump in
|
|
28
|
+
// lockstep with the other two pin sites named in the header above.
|
|
29
|
+
const PINNED_SHA256 = '3c636034e87f89efdb4d4b2cb270e73b2769710dde42651cdd9ee7d865028962';
|
|
30
|
+
describe('coordination-brief hook pin — publish-side gate (KI-COORDMT-HOOK-EXPORT-ROBUSTNESS)', () => {
|
|
31
|
+
it('the bundled hook matches its pinned sha256 (else the CLI must not publish)', () => {
|
|
32
|
+
const bytes = readFileSync(HOOK_FILE);
|
|
33
|
+
const actual = createHash('sha256').update(bytes).digest('hex');
|
|
34
|
+
expect(actual).toBe(PINNED_SHA256);
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
//# sourceMappingURL=coordination-brief-pin.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coordination-brief-pin.test.js","sourceRoot":"","sources":["../../src/__tests__/coordination-brief-pin.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAE1C,MAAM,IAAI,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AACrD,+EAA+E;AAC/E,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,EAAE,OAAO,EAAE,uBAAuB,CAAC,CAAC;AAEjG,mFAAmF;AACnF,mEAAmE;AACnE,MAAM,aAAa,GAAG,kEAAkE,CAAC;AAEzF,QAAQ,CAAC,qFAAqF,EAAE,GAAG,EAAE;IACnG,EAAE,CAAC,4EAA4E,EAAE,GAAG,EAAE;QACpF,MAAM,KAAK,GAAG,YAAY,CAAC,SAAS,CAAC,CAAC;QACtC,MAAM,MAAM,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAChE,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IACrC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|