@event4u/agent-config 17.3.0 → 17.4.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/.augment-plugin/marketplace.json +3 -3
- package/.augment-plugin/plugin.json +1 -1
- package/.claude-plugin/marketplace.json +1 -1
- package/CHANGELOG.md +164 -342
- package/CREDITS.md +2 -2
- package/README.md +1 -1
- package/dist/agent-src/skills/code-intelligence/SKILL.md +3 -0
- package/dist/agent-src/templates/agents/agent-project-settings.example.yml +1 -1
- package/dist/cli/registry.js +2 -2
- package/dist/cli-delegate/{chunk-DHSSP7V3.js → chunk-5AYJGUA3.js} +0 -2
- package/dist/cli-delegate/chunk-DIFZBP4G.js +1336 -0
- package/dist/cli-delegate/{chunk-MT2WOOCY.js → chunk-WY5ZZPGL.js} +2 -2
- package/dist/cli-delegate/{chunk-ORJPBER2.js → chunk-X6LZ7W5A.js} +73 -10
- package/dist/cli-delegate/cmd_conformance.js +175 -183
- package/dist/cli-delegate/cmd_doctor.js +5 -5
- package/dist/cli-delegate/cmd_doctor_neighbours.js +3 -3
- package/dist/cli-delegate/cmd_explain.js +1 -1
- package/dist/cli-delegate/cmd_handoff.js +2 -2
- package/dist/cli-delegate/cmd_memory_get.js +1 -1
- package/dist/cli-delegate/cmd_route_audit.js +1 -1
- package/dist/cli-delegate/cmd_session_recycle.js +2 -2
- package/dist/cli-delegate/cmd_update.js +24 -13
- package/dist/cli-delegate/cmd_upgrade.js +2 -2
- package/dist/cli-delegate/dist-25AZAHOP.js +3240 -0
- package/dist/cli-delegate/dist-P7MFPMF3.js +411 -0
- package/dist/cli-delegate/dist-XAS5ZLQB.js +6 -0
- package/dist/cli-delegate/{upgrade_unattended-VVL6JLSX.js → upgrade_unattended-QCWOKTUN.js} +178 -163
- package/dist/discovery/deprecation-report.md +1 -1
- package/dist/discovery/discovery-manifest.json +3 -3
- package/dist/discovery/discovery-manifest.json.sha256 +1 -1
- package/dist/discovery/discovery-manifest.summary.md +1 -1
- package/dist/discovery/dormancy-report.md +1 -1
- package/dist/discovery/orphan-report.md +1 -1
- package/dist/discovery/packs.json +2 -2
- package/dist/discovery/trust-report.md +1 -1
- package/dist/discovery/workspaces.json +2 -2
- package/dist/hooks/code_graph_refresh.chunk.cjs +56 -27
- package/dist/hooks/code_graph_refresh.chunk.cjs.sha256 +1 -1
- package/dist/hooks/dispatch.js +982 -929
- package/dist/hooks/dispatch.sha256 +1 -1
- package/dist/hooks/egress_engine.chunk.cjs +56 -6
- package/dist/hooks/egress_engine.chunk.cjs.sha256 +1 -1
- package/dist/hooks/update_notice.chunk.cjs +914 -0
- package/dist/hooks/update_notice.chunk.cjs.sha256 +1 -0
- package/dist/mcp/registry-manifest.json +1 -1
- package/dist/mcp/server.json +2 -2
- package/dist/mcp/server.mjs +71259 -66437
- package/dist/scripts/condense.js +9 -6
- package/package.json +4 -1
- package/src/config/evaluator-budgets.json +9 -8
- package/src/config/gate-violation-baselines.json +2 -2
- package/src/config/hook-bundle-budget.json +31 -6
- package/src/config/packed-binary-manifest.json +9 -0
- package/src/config/sigstore/npm_keys.json +50 -0
- package/src/config/sigstore/trust-material.json +9 -0
- package/src/config/sigstore/trusted_root.json +126 -0
- package/src/config/skill-body-budget.json +7 -1
- package/src/scripts/_cli/cmd_update.ts +48 -20
- package/src/scripts/_cli/cmd_upgrade.ts +7 -1
- package/src/scripts/_cli/upgrade_unattended.ts +90 -76
- package/src/scripts/_dispatch.bash +3 -2
- package/src/scripts/_lib/confusables.ts +0 -19
- package/src/scripts/_lib/egress_normalize.ts +53 -23
- package/src/scripts/_lib/egress_text.ts +5 -3
- package/src/scripts/_lib/egress_token.ts +7 -5
- package/src/scripts/_lib/gate_collector_experimental.ts +633 -0
- package/src/scripts/_lib/git_common_dir.ts +10 -0
- package/src/scripts/_lib/graph_feeder_record.ts +3 -2
- package/src/scripts/_lib/install_reach_checks.ts +32 -2
- package/src/scripts/_lib/lineage_backfill.ts +136 -0
- package/src/scripts/_lib/lineage_ledger.ts +211 -0
- package/src/scripts/_lib/lineage_map.ts +55 -0
- package/src/scripts/_lib/lineage_query.ts +140 -0
- package/src/scripts/_lib/lineage_seed.ts +116 -0
- package/src/scripts/_lib/lineage_watch.ts +249 -0
- package/src/scripts/_lib/link_crypto.ts +8 -4
- package/src/scripts/_lib/production_reach.ts +3 -3
- package/src/scripts/_lib/project_registry.ts +227 -0
- package/src/scripts/_lib/provenance_verify.ts +14 -242
- package/src/scripts/_lib/sigstore_provenance.ts +177 -0
- package/src/scripts/_lib/source_id.ts +48 -0
- package/src/scripts/_lib/source_shape.ts +4 -0
- package/src/scripts/_lib/unattended_gates.ts +6 -1
- package/src/scripts/advisories.ts +26 -10
- package/src/scripts/ai_council/council_egress.ts +5 -6
- package/src/scripts/bench_graph_feeder_latency.ts +10 -3
- package/src/scripts/check_dependency_floors.ts +7 -0
- package/src/scripts/check_egress_mutations.ts +1 -0
- package/src/scripts/code_graph/build.ts +67 -3
- package/src/scripts/code_graph/cli.ts +131 -28
- package/src/scripts/code_graph/conventions_default.ts +20 -1
- package/src/scripts/code_graph/detect.ts +5 -5
- package/src/scripts/code_graph/estate_cli.ts +135 -0
- package/src/scripts/code_graph/estate_index.ts +394 -0
- package/src/scripts/code_graph/estate_manifests.ts +223 -0
- package/src/scripts/code_graph/estate_map.ts +141 -0
- package/src/scripts/code_graph/extract.ts +4 -1
- package/src/scripts/code_graph/extract_more.ts +137 -2
- package/src/scripts/code_graph/graph_budget.ts +158 -0
- package/src/scripts/code_graph/graph_home.ts +80 -0
- package/src/scripts/code_graph/lineage_cli.ts +315 -0
- package/src/scripts/code_graph/map.ts +22 -13
- package/src/scripts/code_graph/map_model.ts +67 -12
- package/src/scripts/code_graph/map_verify.ts +68 -5
- package/src/scripts/code_graph/map_viewer/viewer.css +12 -0
- package/src/scripts/code_graph/map_viewer/viewer.js +45 -15
- package/src/scripts/code_graph/project_ref.ts +25 -0
- package/src/scripts/code_graph/projects_cli.ts +254 -0
- package/src/scripts/code_graph/providers/catalog.ts +14 -5
- package/src/scripts/code_graph/providers/django.ts +52 -9
- package/src/scripts/code_graph/providers/index.ts +2 -0
- package/src/scripts/code_graph/providers/rails.ts +204 -0
- package/src/scripts/code_graph/providers/spring.ts +38 -1
- package/src/scripts/code_graph/query.ts +9 -9
- package/src/scripts/code_graph/refresh_lock.ts +12 -8
- package/src/scripts/code_graph/repo_identity.ts +169 -0
- package/src/scripts/code_graph/sqlite_store.ts +22 -25
- package/src/scripts/code_graph/types.ts +6 -2
- package/src/scripts/condense.ts +6 -6
- package/src/scripts/hook_chunks.mjs +7 -0
- package/src/scripts/hook_manifest.json +1 -1
- package/src/scripts/hook_manifest.yaml +20 -17
- package/src/scripts/hooks/code_graph_refresh_hook.ts +10 -7
- package/src/scripts/hooks/dispatch_hook.ts +6 -7
- package/src/scripts/hooks/host_semantics.ts +72 -0
- package/src/scripts/hooks/lazy_concern.ts +4 -0
- package/src/scripts/hooks/user_notice.ts +105 -0
- package/src/scripts/lint_harvest_provenance.ts +137 -11
- package/src/scripts/mcp_server/consumer_tool_catalog.json +69 -15
- package/src/scripts/mcp_server/graph_tools.ts +161 -41
- package/src/scripts/network_sources.ts +24 -6
- package/src/scripts/schemas/provenance-mechanism.schema.json +46 -0
- package/src/scripts/update_notice_hook.ts +75 -7
- package/src/vendor/grammars/README.md +7 -6
- package/src/vendor/grammars/tree-sitter-ruby.wasm +0 -0
- /package/dist/cli-delegate/{chunk-FKYZOWVD.js → chunk-QBAFP67O.js} +0 -0
- /package/dist/cli-delegate/{chunk-BMGUGSY6.js → chunk-TQG6UMPC.js} +0 -0
|
@@ -32,7 +32,6 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
32
32
|
// src/scripts/hooks/code_graph_refresh_hook.ts
|
|
33
33
|
var code_graph_refresh_hook_exports = {};
|
|
34
34
|
__export(code_graph_refresh_hook_exports, {
|
|
35
|
-
CACHE_REL: () => CACHE_REL,
|
|
36
35
|
REFRESH_ARGS: () => REFRESH_ARGS,
|
|
37
36
|
main: () => main,
|
|
38
37
|
refreshFor: () => refreshFor,
|
|
@@ -41,8 +40,8 @@ __export(code_graph_refresh_hook_exports, {
|
|
|
41
40
|
});
|
|
42
41
|
module.exports = __toCommonJS(code_graph_refresh_hook_exports);
|
|
43
42
|
var import_node_child_process = require("node:child_process");
|
|
44
|
-
var
|
|
45
|
-
var
|
|
43
|
+
var fs5 = __toESM(require("node:fs"), 1);
|
|
44
|
+
var path5 = __toESM(require("node:path"), 1);
|
|
46
45
|
var import_node_url = require("node:url");
|
|
47
46
|
|
|
48
47
|
// src/scripts/_lib/spawn_env.ts
|
|
@@ -158,19 +157,49 @@ function usableCli(root, envPath) {
|
|
|
158
157
|
return cliIsCapable(cli) ? { cli } : { reason: "cli-too-old", cli };
|
|
159
158
|
}
|
|
160
159
|
|
|
161
|
-
// src/scripts/code_graph/
|
|
160
|
+
// src/scripts/code_graph/graph_home.ts
|
|
162
161
|
var fs2 = __toESM(require("node:fs"), 1);
|
|
163
|
-
var
|
|
162
|
+
var path3 = __toESM(require("node:path"), 1);
|
|
163
|
+
|
|
164
|
+
// src/scripts/_lib/user_global_paths.ts
|
|
164
165
|
var path2 = __toESM(require("node:path"), 1);
|
|
165
|
-
var
|
|
166
|
-
var
|
|
166
|
+
var DEFAULT_EVENT4U_ROOT_RELATIVE = path2.join(".event4u", "agent-config");
|
|
167
|
+
var LEGACY_XDG_ROOT_RELATIVE = path2.join(".config", "agent-config");
|
|
168
|
+
|
|
169
|
+
// src/scripts/code_graph/graph_home.ts
|
|
170
|
+
var STATE_DIR_REL = path3.join("agents", "runtime", "state");
|
|
171
|
+
var NATIVE_CACHE_REL = path3.join(STATE_DIR_REL, "code-graph-v1.json");
|
|
172
|
+
var MAP_DIR_REL = path3.join("agents", "map");
|
|
173
|
+
var LOCK_REL = path3.join(STATE_DIR_REL, "code-graph-refresh.lock");
|
|
174
|
+
var AUTO_REFRESH_REL = path3.join(STATE_DIR_REL, "code-graph-auto-refresh.json");
|
|
175
|
+
function hasProjectHome(root) {
|
|
176
|
+
return fs2.existsSync(path3.join(root, "agents")) || fs2.existsSync(path3.join(root, ".agent-settings.yml"));
|
|
177
|
+
}
|
|
178
|
+
function projectHome(root) {
|
|
179
|
+
return {
|
|
180
|
+
kind: "project",
|
|
181
|
+
root,
|
|
182
|
+
dir: path3.join(root, "agents"),
|
|
183
|
+
stateDir: path3.join(root, STATE_DIR_REL),
|
|
184
|
+
cachePath: path3.join(root, NATIVE_CACHE_REL),
|
|
185
|
+
mapDir: path3.join(root, MAP_DIR_REL),
|
|
186
|
+
lockPath: path3.join(root, LOCK_REL),
|
|
187
|
+
autoRefreshPath: path3.join(root, AUTO_REFRESH_REL),
|
|
188
|
+
repoId: null,
|
|
189
|
+
instance: null
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
// src/scripts/code_graph/refresh_lock.ts
|
|
194
|
+
var fs3 = __toESM(require("node:fs"), 1);
|
|
195
|
+
var os = __toESM(require("node:os"), 1);
|
|
196
|
+
var path4 = __toESM(require("node:path"), 1);
|
|
167
197
|
var STALE_LOCK_MS = 5 * 60 * 1e3;
|
|
168
198
|
var MAX_LOCK_AGE_MS = 30 * 60 * 1e3;
|
|
169
199
|
var ownerPath = (lock) => `${lock}.owner.json`;
|
|
170
|
-
|
|
171
|
-
function recordRefresh(root, rec) {
|
|
200
|
+
function recordRefreshIn(stateDir, rec) {
|
|
172
201
|
try {
|
|
173
|
-
|
|
202
|
+
fs3.writeFileSync(path4.join(stateDir, `code-graph-refresh.${rec.by}.json`), JSON.stringify({ at: (/* @__PURE__ */ new Date()).toISOString(), ...rec }));
|
|
174
203
|
} catch {
|
|
175
204
|
}
|
|
176
205
|
}
|
|
@@ -186,7 +215,7 @@ var errno = (e) => e.code;
|
|
|
186
215
|
function readOwner(lock) {
|
|
187
216
|
let raw;
|
|
188
217
|
try {
|
|
189
|
-
raw =
|
|
218
|
+
raw = fs3.readFileSync(ownerPath(lock), "utf-8");
|
|
190
219
|
} catch (e) {
|
|
191
220
|
return errno(e) === "ENOENT" ? "none" : "unreadable";
|
|
192
221
|
}
|
|
@@ -205,7 +234,7 @@ function isStale(lock, now = Date.now()) {
|
|
|
205
234
|
return !pidAlive(owner.pid);
|
|
206
235
|
}
|
|
207
236
|
try {
|
|
208
|
-
return now -
|
|
237
|
+
return now - fs3.statSync(lock).mtimeMs > STALE_LOCK_MS;
|
|
209
238
|
} catch (e) {
|
|
210
239
|
return errno(e) === "ENOENT";
|
|
211
240
|
}
|
|
@@ -251,7 +280,7 @@ var EXIT_CODES = Object.freeze([
|
|
|
251
280
|
var tty = __toESM(require("node:tty"), 1);
|
|
252
281
|
|
|
253
282
|
// src/scripts/_lib/stdin.ts
|
|
254
|
-
var
|
|
283
|
+
var fs4 = __toESM(require("node:fs"), 1);
|
|
255
284
|
var CHUNK = 64 * 1024;
|
|
256
285
|
var RETRY_SLEEP_MS = 5;
|
|
257
286
|
var MAX_RETRIES = 2e3;
|
|
@@ -267,7 +296,7 @@ function readStdinText(fd = 0, opts = {}) {
|
|
|
267
296
|
for (; ; ) {
|
|
268
297
|
let read;
|
|
269
298
|
try {
|
|
270
|
-
read =
|
|
299
|
+
read = fs4.readSync(fd, buf, 0, CHUNK, null);
|
|
271
300
|
retries = 0;
|
|
272
301
|
} catch (exc) {
|
|
273
302
|
const code = exc.code;
|
|
@@ -322,23 +351,22 @@ function is_replay_mode() {
|
|
|
322
351
|
}
|
|
323
352
|
|
|
324
353
|
// src/scripts/hooks/code_graph_refresh_hook.ts
|
|
325
|
-
var CACHE_REL = path3.join("agents", "runtime", "state", "code-graph-v1.json");
|
|
326
354
|
var REFRESH_ARGS = ["code-graph", "refresh", "--single-flight", "--map", "--budget-seconds", "60"];
|
|
327
355
|
function repoRoot(start) {
|
|
328
356
|
let dir;
|
|
329
357
|
try {
|
|
330
|
-
dir =
|
|
358
|
+
dir = fs5.realpathSync(start);
|
|
331
359
|
} catch {
|
|
332
360
|
return null;
|
|
333
361
|
}
|
|
334
362
|
for (; ; ) {
|
|
335
363
|
try {
|
|
336
|
-
|
|
364
|
+
fs5.lstatSync(path5.join(dir, ".git"));
|
|
337
365
|
return dir;
|
|
338
366
|
} catch (e) {
|
|
339
367
|
if (e.code !== "ENOENT") return null;
|
|
340
368
|
}
|
|
341
|
-
const up =
|
|
369
|
+
const up = path5.dirname(dir);
|
|
342
370
|
if (up === dir) return null;
|
|
343
371
|
dir = up;
|
|
344
372
|
}
|
|
@@ -360,15 +388,17 @@ function refreshFor(cwd, spawnFn = import_node_child_process.spawn) {
|
|
|
360
388
|
if (process.platform === "win32") return "unsupported";
|
|
361
389
|
if (is_replay_mode()) return "replay";
|
|
362
390
|
const root = repoRoot(cwd);
|
|
363
|
-
if (root === null || !
|
|
364
|
-
|
|
391
|
+
if (root === null || !hasProjectHome(root)) return "not-opted-in";
|
|
392
|
+
const home = projectHome(root);
|
|
393
|
+
if (!fs5.existsSync(home.autoRefreshPath)) return "not-opted-in";
|
|
394
|
+
if (anyTracked(root, [home.autoRefreshPath, home.cachePath].map((p) => path5.relative(root, p)))) return "tracked";
|
|
365
395
|
const done = (outcome, detail) => {
|
|
366
|
-
|
|
396
|
+
recordRefreshIn(home.stateDir, { by: "session-start", outcome, detail });
|
|
367
397
|
return outcome;
|
|
368
398
|
};
|
|
369
|
-
if (!
|
|
370
|
-
const lock =
|
|
371
|
-
if (
|
|
399
|
+
if (!fs5.existsSync(home.cachePath)) return done("no-cache");
|
|
400
|
+
const lock = home.lockPath;
|
|
401
|
+
if (fs5.existsSync(lock) && !isStale(lock)) return done("locked");
|
|
372
402
|
const verdict = usableCli(root);
|
|
373
403
|
if ("reason" in verdict) return done(verdict.reason, verdict.cli);
|
|
374
404
|
const child = spawnFn(verdict.cli, [...REFRESH_ARGS, "--root", root], {
|
|
@@ -395,9 +425,9 @@ function main() {
|
|
|
395
425
|
function isCliEntry() {
|
|
396
426
|
if (true) return false;
|
|
397
427
|
if (process.argv[1] === void 0) return false;
|
|
398
|
-
if (__acChunkMetaUrl === (0, import_node_url.pathToFileURL)(
|
|
428
|
+
if (__acChunkMetaUrl === (0, import_node_url.pathToFileURL)(path5.resolve(process.argv[1])).href) return true;
|
|
399
429
|
try {
|
|
400
|
-
return
|
|
430
|
+
return fs5.realpathSync((0, import_node_url.fileURLToPath)(__acChunkMetaUrl)) === fs5.realpathSync(path5.resolve(process.argv[1]));
|
|
401
431
|
} catch {
|
|
402
432
|
return false;
|
|
403
433
|
}
|
|
@@ -405,7 +435,6 @@ function isCliEntry() {
|
|
|
405
435
|
if (isCliEntry()) process.exit(main());
|
|
406
436
|
// Annotate the CommonJS export names for ESM import in node:
|
|
407
437
|
0 && (module.exports = {
|
|
408
|
-
CACHE_REL,
|
|
409
438
|
REFRESH_ARGS,
|
|
410
439
|
main,
|
|
411
440
|
refreshFor,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
fdef0100152bef370980295f03f85f4c6ea3bab4376cecda0c83479b6c97ed4b code_graph_refresh.chunk.cjs
|