@bongos/core 1.19.437 → 1.19.438

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/.bongos-core.json CHANGED
@@ -2,22 +2,22 @@
2
2
  "artifact": "bongos-core",
3
3
  "manifest_schema": 1,
4
4
  "generator": "scripts/gds/package-core.js",
5
- "core_version": "1.19.437",
6
- "core_contract": "1.19.437",
7
- "source_commit": "a19cfca1c4490ec543603d83defdefb98de8da80",
5
+ "core_version": "1.19.438",
6
+ "core_contract": "1.19.438",
7
+ "source_commit": "c2a43c1cb58424038a4b4f8876d0d50640ffbb45",
8
8
  "source_ref": "HEAD",
9
- "built_at": "2026-08-30T03:08:23.716Z",
9
+ "built_at": "2026-08-30T03:25:35.542Z",
10
10
  "redaction": {
11
11
  "model": "docs-redacted+functional-verbatim",
12
12
  "docs_redacted": 369,
13
13
  "agent_docs_stubbed": 23,
14
- "functional_verbatim": 1743,
14
+ "functional_verbatim": 1744,
15
15
  "rules": 3,
16
16
  "gate_literals": 3,
17
17
  "gate": "passed"
18
18
  },
19
- "file_count": 2135,
20
- "tree_sha256": "a3d39a99e32c492d5ae17ae906d89add5544bc902225fa056e0c6c8f9f4110ca",
19
+ "file_count": 2136,
20
+ "tree_sha256": "4a2e873477ef29bc7b68f35a86b59e85043e8b397c87b84e2a486930919d3d10",
21
21
  "files": [
22
22
  {
23
23
  "path": ".claude/skills/blocker-review/SKILL.md",
@@ -1997,7 +1997,7 @@
1997
1997
  {
1998
1998
  "path": "docs/module-api-changelog.md",
1999
1999
  "mode": "0000644",
2000
- "sha256": "eb14f5a0f47e80dfc687ef5193e73de5da6d937a90e88ad71bb4e2e6d70c2ad3"
2000
+ "sha256": "5eeb368487db6157e3ff6e729c0a0d193081e62934e5c2c2d69c7c56d901380b"
2001
2001
  },
2002
2002
  {
2003
2003
  "path": "docs/modules-contract.md",
@@ -5607,12 +5607,12 @@
5607
5607
  {
5608
5608
  "path": "package-lock.json",
5609
5609
  "mode": "0000644",
5610
- "sha256": "38ae27226a931dea4012fd645931624e0592a047c14350cfd0c5252b2230c0d6"
5610
+ "sha256": "9825b36c3afc725b8d8b25b3b3cd5ddd882905327cac8741de44fbd249df4eef"
5611
5611
  },
5612
5612
  {
5613
5613
  "path": "package.json",
5614
5614
  "mode": "0000644",
5615
- "sha256": "54a547f0c6490348fe2695d83d7a0639fd9c583a0472bc3974db590ee23e1434"
5615
+ "sha256": "f784ade5e8fe1d320fe0cec64c9913530c173dd78c9f2b3d7672620862c8cc50"
5616
5616
  },
5617
5617
  {
5618
5618
  "path": "public-docs/index.html",
@@ -7747,7 +7747,7 @@
7747
7747
  {
7748
7748
  "path": "src/module-api.js",
7749
7749
  "mode": "0000644",
7750
- "sha256": "0537028fe74fccf01b238c487a133a416cedfcdceba1d212c4259f50101c6014"
7750
+ "sha256": "858a06eaac3220a29515fe2b6d1ffd3f457e55916517c203b677378b17db4ce0"
7751
7751
  },
7752
7752
  {
7753
7753
  "path": "src/module-loader/catalog.js",
@@ -9164,6 +9164,11 @@
9164
9164
  "mode": "0000644",
9165
9165
  "sha256": "ed1e14050ba219a52736c2cd70f4d4333a345fb0018211c85293a995c7f0aac7"
9166
9166
  },
9167
+ {
9168
+ "path": "tests/hooks_drain.mjs",
9169
+ "mode": "0000644",
9170
+ "sha256": "d616a075d7e48e2123c08a60b023aad2d2c1cc1bb4a73caa9b6e8189dda30e6f"
9171
+ },
9167
9172
  {
9168
9173
  "path": "tests/host_topology_skips.mjs",
9169
9174
  "mode": "0000644",
@@ -1311,5 +1311,7 @@ is load-bearing: the script throws rather than guess if it is missing, and
1311
1311
  landed since 1.19.435 with no explicit bump. run 33288364716. (task 1002620)
1312
1312
  1.19.437 — CI auto-patch (publish-on-merge, ADR 0161): carrier for merges
1313
1313
  landed since 1.19.436 with no explicit bump. run 33289560561. (task 1002620)
1314
+ 1.19.438 — CI auto-patch (publish-on-merge, ADR 0161): carrier for merges
1315
+ landed since 1.19.437 with no explicit bump. run 33290212472. (task 1002620)
1314
1316
  ---------------------------------------------------------------------------
1315
1317
  ```
package/package-lock.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@bongos/core",
3
- "version": "1.19.437",
3
+ "version": "1.19.438",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@bongos/core",
9
- "version": "1.19.437",
9
+ "version": "1.19.438",
10
10
  "license": "AGPL-3.0-or-later",
11
11
  "dependencies": {
12
12
  "express": "^4.21.2",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bongos/core",
3
- "version": "1.19.437",
3
+ "version": "1.19.438",
4
4
  "description": "Cloud Bongos — the AI-first build platform core (GDS + platform surfaces + module system), installed as a versioned dependency (ADR 0108).",
5
5
  "license": "AGPL-3.0-or-later",
6
6
  "main": "src/platform-server.js",
package/src/module-api.js CHANGED
@@ -33,7 +33,7 @@ const { validateOrRespond, LIMITS, parseId, asyncHandler, corsPublicGet, parsePa
33
33
  // there. scripts/gds/bump-version.js still rewrites the literal below; it appends
34
34
  // the entry to that file. Look for a version's history there, not here.
35
35
  // ---------------------------------------------------------------------------
36
- const CORE_VERSION = '1.19.437'; // CI auto-patch carrier (ADR 0161); changelog: docs/module-api-changelog.md
36
+ const CORE_VERSION = '1.19.438'; // CI auto-patch carrier (ADR 0161); changelog: docs/module-api-changelog.md
37
37
 
38
38
  // A namespaced logger so a module's log lines are attributable + consistent.
39
39
  // Usage: const log = api.logger('dev-box'); log.info('mounted');
@@ -0,0 +1,58 @@
1
+ // tests/hooks_drain.mjs — the hooks that talk to the API must exit by DRAINING, never
2
+ // process.exit() (task 1003433; task 1003432 for the Stop hook). On Windows, exiting
3
+ // while a pooled socket is mid-close aborts Node with libuv's UV_HANDLE_CLOSING
4
+ // assertion — a red "hook error" line on every prompt. Each hook is spawned the way
5
+ // the harness spawns it; the contract is: exits on its own, exit 0, no abort on stderr.
6
+ //
7
+ // Offline by construction: no session token in the env and a throwaway HOME, so every
8
+ // hook takes its "not signed in" no-op path — the exit mechanics are what's under test.
9
+ //
10
+ // .claude/hooks/ is instance-materialized and package-excluded (PROTECTED_TOPOLOGY_EXCLUDE
11
+ // in scripts/gds/publish-manifest.js), so a clean core checkout has no hooks: skip cleanly.
12
+ //
13
+ // Run: node tests/hooks_drain.mjs
14
+
15
+ import { strict as assert } from 'node:assert';
16
+ import { spawnSync } from 'node:child_process';
17
+ import fs from 'node:fs';
18
+ import os from 'node:os';
19
+ import path from 'node:path';
20
+ import { fileURLToPath } from 'node:url';
21
+
22
+ const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
23
+ const HOOKS = ['recall-hints', 'rank-change-greeting', 'conductor'].map((n) => path.join(ROOT, '.claude', 'hooks', `${n}.js`));
24
+
25
+ if (!HOOKS.every((p) => fs.existsSync(p))) {
26
+ console.log('hooks_drain: SKIP — .claude/hooks/ is not materialized in this checkout (package-excluded).');
27
+ process.exit(0);
28
+ }
29
+
30
+ let passed = 0;
31
+ let failed = 0;
32
+ function t(name, fn) {
33
+ try { fn(); passed++; console.log(` PASS ${name}`); }
34
+ catch (e) { failed++; console.log(` FAIL ${name}\n ${e.message}`); }
35
+ }
36
+
37
+ const HOME = fs.mkdtempSync(path.join(os.tmpdir(), 'hooks-drain-'));
38
+ const transcript = path.join(HOME, 't.jsonl');
39
+ fs.writeFileSync(transcript, JSON.stringify({ type: 'assistant', message: { content: [{ type: 'text', text: 'hello' }] } }) + '\n');
40
+ const payload = JSON.stringify({ session_id: 's1', transcript_path: transcript, cwd: ROOT, hook_event_name: 'UserPromptSubmit', prompt: 'status?' });
41
+
42
+ const env = { ...process.env, HOME, USERPROFILE: HOME, CLAUDE_PROJECT_DIR: ROOT };
43
+ for (const k of Object.keys(env)) if (/_API_BASE$|^OTB_|^CLOUDBONGOS_|^GDS_|^PMS_/.test(k)) delete env[k];
44
+
45
+ for (const hook of HOOKS) {
46
+ t(`${path.basename(hook)} exits on its own with 0 and no libuv abort (x3)`, () => {
47
+ for (let i = 0; i < 3; i++) {
48
+ const r = spawnSync(process.execPath, [hook], { input: payload, encoding: 'utf8', timeout: 15000, env });
49
+ assert.equal(r.signal, null, `run ${i}: killed by ${r.signal} — did not drain`);
50
+ assert.equal(r.status, 0, `run ${i}: exit ${r.status}\n${r.stderr}`);
51
+ assert.ok(!/Assertion failed/.test(r.stderr || ''), `run ${i}: libuv abort on stderr:\n${r.stderr}`);
52
+ }
53
+ });
54
+ }
55
+
56
+ fs.rmSync(HOME, { recursive: true, force: true });
57
+ console.log(`\nhooks_drain: ${passed} passed, ${failed} failed`);
58
+ process.exit(failed ? 1 : 0);