@bongos/core 1.19.943 → 1.19.944
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 +12 -12
- package/docs/module-api-changelog.md +2 -0
- package/package-lock.json +2 -2
- package/package.json +1 -1
- package/scripts/gds/agents-sync.js +17 -7
- package/scripts/migrate.sh +8 -6
- package/src/module-api.js +1 -1
- package/tests/agents_sync.mjs +32 -0
package/.bongos-core.json
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
"artifact": "bongos-core",
|
|
3
3
|
"manifest_schema": 1,
|
|
4
4
|
"generator": "scripts/gds/package-core.js",
|
|
5
|
-
"core_version": "1.19.
|
|
6
|
-
"core_contract": "1.19.
|
|
7
|
-
"source_commit": "
|
|
5
|
+
"core_version": "1.19.944",
|
|
6
|
+
"core_contract": "1.19.944",
|
|
7
|
+
"source_commit": "9bb024296de8bc08497922c176fac32f1cbd4072",
|
|
8
8
|
"source_ref": "HEAD",
|
|
9
|
-
"built_at": "2026-09-21T22:
|
|
9
|
+
"built_at": "2026-09-21T22:56:15.068Z",
|
|
10
10
|
"redaction": {
|
|
11
11
|
"model": "docs-redacted+functional-verbatim",
|
|
12
12
|
"docs_redacted": 511,
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"gate": "passed"
|
|
18
18
|
},
|
|
19
19
|
"file_count": 2877,
|
|
20
|
-
"tree_sha256": "
|
|
20
|
+
"tree_sha256": "0ba58d1da09b858f4ba434ece27993e6d514cbb7622e15d3987343c832c6710e",
|
|
21
21
|
"files": [
|
|
22
22
|
{
|
|
23
23
|
"path": ".claude/skills/ask-for-help/SKILL.md",
|
|
@@ -2677,7 +2677,7 @@
|
|
|
2677
2677
|
{
|
|
2678
2678
|
"path": "docs/module-api-changelog.md",
|
|
2679
2679
|
"mode": "0000644",
|
|
2680
|
-
"sha256": "
|
|
2680
|
+
"sha256": "fd85af374ab5c378414a246c9575a5254fb720e1c9ba0792093c96ebdd07b1f7"
|
|
2681
2681
|
},
|
|
2682
2682
|
{
|
|
2683
2683
|
"path": "docs/modules-contract.md",
|
|
@@ -8002,12 +8002,12 @@
|
|
|
8002
8002
|
{
|
|
8003
8003
|
"path": "package-lock.json",
|
|
8004
8004
|
"mode": "0000644",
|
|
8005
|
-
"sha256": "
|
|
8005
|
+
"sha256": "915c0d9eda15ebe2198dff6cbc476e11b5ef5c286b3bcd5cb47aed9f7eba3599"
|
|
8006
8006
|
},
|
|
8007
8007
|
{
|
|
8008
8008
|
"path": "package.json",
|
|
8009
8009
|
"mode": "0000644",
|
|
8010
|
-
"sha256": "
|
|
8010
|
+
"sha256": "9174d7da67f1bce8d88d2e2ef0da7c656910d53c955040d3a9f74e8b0dede5f6"
|
|
8011
8011
|
},
|
|
8012
8012
|
{
|
|
8013
8013
|
"path": "public-docs/index.html",
|
|
@@ -8097,7 +8097,7 @@
|
|
|
8097
8097
|
{
|
|
8098
8098
|
"path": "scripts/gds/agents-sync.js",
|
|
8099
8099
|
"mode": "0000644",
|
|
8100
|
-
"sha256": "
|
|
8100
|
+
"sha256": "29f3d1521c04165a891a8055f005cb51ca019c51c556063e55167675051a43af"
|
|
8101
8101
|
},
|
|
8102
8102
|
{
|
|
8103
8103
|
"path": "scripts/gds/api-alias-caller-scan.js",
|
|
@@ -9617,7 +9617,7 @@
|
|
|
9617
9617
|
{
|
|
9618
9618
|
"path": "scripts/migrate.sh",
|
|
9619
9619
|
"mode": "0000644",
|
|
9620
|
-
"sha256": "
|
|
9620
|
+
"sha256": "1ba289b008ef4118cfd464ab5eb24ad4b694981942680220f115913691645e08"
|
|
9621
9621
|
},
|
|
9622
9622
|
{
|
|
9623
9623
|
"path": "scripts/migrate_cost_ledger.sh",
|
|
@@ -10012,7 +10012,7 @@
|
|
|
10012
10012
|
{
|
|
10013
10013
|
"path": "src/module-api.js",
|
|
10014
10014
|
"mode": "0000644",
|
|
10015
|
-
"sha256": "
|
|
10015
|
+
"sha256": "ff95cfa479f2e1c5d4b9598d832a43743122b621338de3f5e902289d00e379d8"
|
|
10016
10016
|
},
|
|
10017
10017
|
{
|
|
10018
10018
|
"path": "src/module-loader/catalog.js",
|
|
@@ -10187,7 +10187,7 @@
|
|
|
10187
10187
|
{
|
|
10188
10188
|
"path": "tests/agents_sync.mjs",
|
|
10189
10189
|
"mode": "0000644",
|
|
10190
|
-
"sha256": "
|
|
10190
|
+
"sha256": "daa2d58b9a248222a54305c3fa41d30e73c8ea8cd65db8a14e31d30dfe0ca555"
|
|
10191
10191
|
},
|
|
10192
10192
|
{
|
|
10193
10193
|
"path": "tests/agents_validate.mjs",
|
|
@@ -2360,5 +2360,7 @@ is load-bearing: the script throws rather than guess if it is missing, and
|
|
|
2360
2360
|
landed since 1.19.941 with no explicit bump. run 35659043986. (task 1002620)
|
|
2361
2361
|
1.19.943 — CI auto-patch (publish-on-merge, ADR 0161): carrier for merges
|
|
2362
2362
|
landed since 1.19.942 with no explicit bump. run 35661533404. (task 1002620)
|
|
2363
|
+
1.19.944 — CI auto-patch (publish-on-merge, ADR 0161): carrier for merges
|
|
2364
|
+
landed since 1.19.943 with no explicit bump. run 35665131778. (task 1002620)
|
|
2363
2365
|
---------------------------------------------------------------------------
|
|
2364
2366
|
```
|
package/package-lock.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bongos/core",
|
|
3
|
-
"version": "1.19.
|
|
3
|
+
"version": "1.19.944",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@bongos/core",
|
|
9
|
-
"version": "1.19.
|
|
9
|
+
"version": "1.19.944",
|
|
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.
|
|
3
|
+
"version": "1.19.944",
|
|
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",
|
|
@@ -317,6 +317,14 @@ function planSync(files, { existingByName = new Map(), authorRankFor = () => nul
|
|
|
317
317
|
|
|
318
318
|
// ---- disk + git ------------------------------------------------------------
|
|
319
319
|
|
|
320
|
+
// The repo a definitions dir belongs to, by the `<root>/.claude/agents` layout.
|
|
321
|
+
// Not REPO_ROOT: a split-root instance runs this script from the core package
|
|
322
|
+
// while its definitions live in the instance repo (task 1004139), so paths and
|
|
323
|
+
// git history must be read against the definitions' repo, not the core's.
|
|
324
|
+
function definitionsRoot(dir) {
|
|
325
|
+
return path.resolve(dir, '..', '..');
|
|
326
|
+
}
|
|
327
|
+
|
|
320
328
|
// An ABSENT directory is a legitimate state, not an error: `.claude/agents/`
|
|
321
329
|
// does not exist in the core tree at all today, and an instance that ships no
|
|
322
330
|
// agents must deploy cleanly. Zero files, exit 0, nothing written.
|
|
@@ -328,10 +336,11 @@ function readAgentFiles(dir = DEFAULT_DIR) {
|
|
|
328
336
|
if (err.code === 'ENOENT') return [];
|
|
329
337
|
throw err;
|
|
330
338
|
}
|
|
339
|
+
const root = definitionsRoot(dir);
|
|
331
340
|
return names.sort().map((f) => {
|
|
332
341
|
const full = path.join(dir, f);
|
|
333
342
|
return {
|
|
334
|
-
file: path.relative(
|
|
343
|
+
file: path.relative(root, full).split(path.sep).join('/'),
|
|
335
344
|
candidate: parseAgentFile(fs.readFileSync(full, 'utf8'), { name: f.replace(/\.md$/, '') }),
|
|
336
345
|
};
|
|
337
346
|
});
|
|
@@ -350,9 +359,9 @@ function readAgentFiles(dir = DEFAULT_DIR) {
|
|
|
350
359
|
//
|
|
351
360
|
// It is kept because provenance is genuinely useful where nothing is riding on
|
|
352
361
|
// it. The wall is that it is never consulted where it could grant anything.
|
|
353
|
-
function lastCommitterLogin(file, { runGit = defaultRunGit } = {}) {
|
|
362
|
+
function lastCommitterLogin(file, { runGit = defaultRunGit, cwd = REPO_ROOT } = {}) {
|
|
354
363
|
let out;
|
|
355
|
-
try { out = runGit(['log', '-1', '--format=%ae%n%an', '--', file]); }
|
|
364
|
+
try { out = runGit(['log', '-1', '--format=%ae%n%an', '--', file], cwd); }
|
|
356
365
|
catch { return null; }
|
|
357
366
|
const [email = '', authorName = ''] = String(out || '').split(/\r?\n/);
|
|
358
367
|
const noreply = /^(?:\d+\+)?([A-Za-z0-9-]+)@users\.noreply\.github\.com$/.exec(email.trim());
|
|
@@ -360,8 +369,8 @@ function lastCommitterLogin(file, { runGit = defaultRunGit } = {}) {
|
|
|
360
369
|
return authorName.trim() || null;
|
|
361
370
|
}
|
|
362
371
|
|
|
363
|
-
function defaultRunGit(args) {
|
|
364
|
-
return execFileSync('git', args, { cwd
|
|
372
|
+
function defaultRunGit(args, cwd = REPO_ROOT) {
|
|
373
|
+
return execFileSync('git', args, { cwd, encoding: 'utf8' });
|
|
365
374
|
}
|
|
366
375
|
|
|
367
376
|
module.exports = {
|
|
@@ -386,11 +395,12 @@ async function main() {
|
|
|
386
395
|
const asJson = argv.includes('--json');
|
|
387
396
|
const dirIdx = argv.indexOf('--dir');
|
|
388
397
|
const dir = dirIdx >= 0 ? argv[dirIdx + 1] : DEFAULT_DIR;
|
|
398
|
+
const root = definitionsRoot(dir);
|
|
389
399
|
|
|
390
400
|
const files = readAgentFiles(dir);
|
|
391
401
|
if (files.length === 0) {
|
|
392
402
|
if (asJson) console.log(JSON.stringify({ ok: true, scanned: 0, plan: [] }));
|
|
393
|
-
else console.log(`agents-sync: no definitions under ${path.relative(
|
|
403
|
+
else console.log(`agents-sync: no definitions under ${path.relative(root, dir) || dir} — nothing to reconcile.`);
|
|
394
404
|
return 0;
|
|
395
405
|
}
|
|
396
406
|
|
|
@@ -413,7 +423,7 @@ async function main() {
|
|
|
413
423
|
// ONE git subprocess per file, memoised — `authorRankFor` is called again from
|
|
414
424
|
// planSync, and re-shelling out there doubled the blocking spawns for an answer
|
|
415
425
|
// that cannot have changed mid-run.
|
|
416
|
-
const loginByFile = new Map(files.map((f) => [f.file, lastCommitterLogin(f.file)]));
|
|
426
|
+
const loginByFile = new Map(files.map((f) => [f.file, lastCommitterLogin(f.file, { cwd: root })]));
|
|
417
427
|
// One query for every distinct committer, not one per file.
|
|
418
428
|
const logins = [...new Set([...loginByFile.values()].filter(Boolean))];
|
|
419
429
|
const rankByLogin = new Map();
|
package/scripts/migrate.sh
CHANGED
|
@@ -411,14 +411,16 @@ fi
|
|
|
411
411
|
# Gated on the module set the module loop just migrated (DB overrides included,
|
|
412
412
|
# task 1004138). A fresh isModuleEnabled() read never loaded the overrides, so an
|
|
413
413
|
# `agents` switched on in the hall got its tables but never its registry. Pinned to
|
|
414
|
-
# $DB like that read, so the reconcile writes into the schema this run applied.
|
|
415
|
-
#
|
|
416
|
-
#
|
|
417
|
-
#
|
|
418
|
-
|
|
414
|
+
# $DB like that read, so the reconcile writes into the schema this run applied.
|
|
415
|
+
#
|
|
416
|
+
# The script is the core's, the definitions are the instance's own (task 1004139, an
|
|
417
|
+
# owner decision): a split-root instance (core in node_modules) reconciles ITS
|
|
418
|
+
# .claude/agents, never the core package's shipped set and no merge of the two.
|
|
419
|
+
# Single-root, CORE_ROOT == INSTANCE_ROOT and this is the same call as before.
|
|
420
|
+
if [[ " $NODE_ENABLED_MODULES " == *" agents "* ]]; then
|
|
419
421
|
echo
|
|
420
422
|
echo "post-deploy: reconciling .claude/agents/ into the agent registry"
|
|
421
|
-
if ! DATABASE_URL='' PGDATABASE="$DB" node scripts/gds/agents-sync.js; then
|
|
423
|
+
if ! DATABASE_URL='' PGDATABASE="$DB" node "$CORE_ROOT/scripts/gds/agents-sync.js" --dir "$INSTANCE_ROOT/.claude/agents"; then
|
|
422
424
|
echo "post-deploy: agents-sync failed — the registry is stale by one deploy, not broken" >&2
|
|
423
425
|
fi
|
|
424
426
|
fi
|
package/src/module-api.js
CHANGED
|
@@ -71,7 +71,7 @@ const { responsibilityFor, ROLE_RESPONSIBILITIES } = require('./role-responsibil
|
|
|
71
71
|
// there. scripts/gds/bump-version.js still rewrites the literal below; it appends
|
|
72
72
|
// the entry to that file. Look for a version's history there, not here.
|
|
73
73
|
// ---------------------------------------------------------------------------
|
|
74
|
-
const CORE_VERSION = '1.19.
|
|
74
|
+
const CORE_VERSION = '1.19.944'; // CI auto-patch carrier (ADR 0161); changelog: docs/module-api-changelog.md
|
|
75
75
|
|
|
76
76
|
// A namespaced logger so a module's log lines are attributable + consistent.
|
|
77
77
|
// Usage: const log = api.logger('dev-box'); log.info('mounted');
|
package/tests/agents_sync.mjs
CHANGED
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
// Run: node tests/agents_sync.mjs
|
|
25
25
|
|
|
26
26
|
import { strict as assert } from 'node:assert';
|
|
27
|
+
import { execFileSync } from 'node:child_process';
|
|
27
28
|
import { createRequire } from 'node:module';
|
|
28
29
|
import fs from 'node:fs';
|
|
29
30
|
import os from 'node:os';
|
|
@@ -279,6 +280,32 @@ t('a real directory is read, .md only, sorted', () => {
|
|
|
279
280
|
assert.deepEqual(files.map((f) => f.candidate.name), ['alpha', 'historian'], 'sorted, so a run is reproducible');
|
|
280
281
|
});
|
|
281
282
|
|
|
283
|
+
console.log('\na split-root instance reconciles its OWN definitions (task 1004139):');
|
|
284
|
+
|
|
285
|
+
t('definitions outside the core read against their own repo, not the core', () => {
|
|
286
|
+
// The core runs from node_modules while .claude/agents lives in the instance repo.
|
|
287
|
+
// Read against the core, source_path came out as ../../../.claude/agents/x.md and the
|
|
288
|
+
// git author lookup ran in the wrong repo.
|
|
289
|
+
const root = fs.mkdtempSync(path.join(os.tmpdir(), 'agents-sync-instance-'));
|
|
290
|
+
const dir = path.join(root, '.claude', 'agents');
|
|
291
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
292
|
+
fs.writeFileSync(path.join(dir, 'scout.md'), FILE.replace('name: historian', 'name: scout'));
|
|
293
|
+
const git = (...args) => execFileSync('git', args, { cwd: root, stdio: 'ignore' });
|
|
294
|
+
try {
|
|
295
|
+
git('init', '-q');
|
|
296
|
+
git('add', '.');
|
|
297
|
+
git('-c', 'user.email=12345+octocat@users.noreply.github.com', '-c', 'user.name=Someone',
|
|
298
|
+
'-c', 'commit.gpgsign=false', 'commit', '-q', '--no-verify', '-m', 'add scout');
|
|
299
|
+
|
|
300
|
+
const [f] = sync.readAgentFiles(dir);
|
|
301
|
+
assert.equal(f.file, '.claude/agents/scout.md', 'source_path is relative to the instance root');
|
|
302
|
+
assert.equal(sync.lastCommitterLogin(f.file, { cwd: root }), 'octocat', 'history is read from the instance repo');
|
|
303
|
+
assert.equal(sync.lastCommitterLogin(f.file), null, 'the core repo has no history for an instance file');
|
|
304
|
+
} finally {
|
|
305
|
+
fs.rmSync(root, { recursive: true, force: true });
|
|
306
|
+
}
|
|
307
|
+
});
|
|
308
|
+
|
|
282
309
|
console.log('\nplanSync — the whole reconcile, still pure:');
|
|
283
310
|
|
|
284
311
|
t('one plan entry per file, each carrying its own author rank', () => {
|
|
@@ -407,6 +434,11 @@ t('migrate.sh invokes agents-sync, module-gated and fail-open', () => {
|
|
|
407
434
|
// a fresh isModuleEnabled() read never saw a hall toggle.
|
|
408
435
|
assert.match(sh, /\$NODE_ENABLED_MODULES " == \*" agents "\*/, "gated on the module — it is default:false");
|
|
409
436
|
assert.doesNotMatch(sh, /isModuleEnabled\('agents'\)/, 'no override-blind re-read of the module flag');
|
|
437
|
+
// Split-root (task 1004139): the core's script, the instance's own definitions, pinned to
|
|
438
|
+
// $DB — and no instance-relative file check, which silenced every split-root instance.
|
|
439
|
+
assert.match(sh, /DATABASE_URL='' PGDATABASE="\$DB" node "\$CORE_ROOT\/scripts\/gds\/agents-sync\.js" --dir "\$INSTANCE_ROOT\/\.claude\/agents"/,
|
|
440
|
+
'reconcile the instance .claude/agents with the core script, against $DB');
|
|
441
|
+
assert.doesNotMatch(sh, /-f scripts\/gds\/agents-sync\.js/, 'no instance-relative existence check');
|
|
410
442
|
// Fail-OPEN: a stale registry is a nuisance, an aborted deploy is an outage,
|
|
411
443
|
// and the script is already fail-closed about what it imports.
|
|
412
444
|
assert.match(sh, /agents-sync failed — the registry is stale by one deploy/,
|