@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
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
EGRESS_RULES,
|
|
13
13
|
evaluateMatch,
|
|
14
14
|
shannonEntropy
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-5AYJGUA3.js";
|
|
16
16
|
import {
|
|
17
17
|
SRC_SKILLS
|
|
18
18
|
} from "./chunk-YCU3TIXH.js";
|
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
import {
|
|
36
36
|
TOKEN_RE,
|
|
37
37
|
classifyToken
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-TQG6UMPC.js";
|
|
39
39
|
import {
|
|
40
40
|
readHookStdin
|
|
41
41
|
} from "./chunk-RAXQOETZ.js";
|
|
@@ -21,7 +21,8 @@ import {
|
|
|
21
21
|
} from "./chunk-FTAISGDQ.js";
|
|
22
22
|
import {
|
|
23
23
|
STATE_FILENAME,
|
|
24
|
-
classify_install_origin
|
|
24
|
+
classify_install_origin,
|
|
25
|
+
compare_versions
|
|
25
26
|
} from "./chunk-5VO3RTMV.js";
|
|
26
27
|
import {
|
|
27
28
|
DEFAULT_GITATTRIBUTES,
|
|
@@ -63,11 +64,12 @@ import {
|
|
|
63
64
|
scanTranscripts,
|
|
64
65
|
validateAssumption,
|
|
65
66
|
weightedInputUnits
|
|
66
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-QBAFP67O.js";
|
|
67
68
|
import {
|
|
68
69
|
git_common_dir
|
|
69
70
|
} from "./chunk-IAYTIIQW.js";
|
|
70
71
|
import {
|
|
72
|
+
lockfile_path,
|
|
71
73
|
read_lockfile
|
|
72
74
|
} from "./chunk-LQOCRFWT.js";
|
|
73
75
|
import {
|
|
@@ -89,19 +91,17 @@ import {
|
|
|
89
91
|
readCanaryStatusLine,
|
|
90
92
|
runCensus,
|
|
91
93
|
summaryLine
|
|
92
|
-
} from "./chunk-
|
|
94
|
+
} from "./chunk-WY5ZZPGL.js";
|
|
93
95
|
import {
|
|
94
96
|
EGRESS_RULES,
|
|
95
97
|
REVIEW_CREDENTIAL_ROWS,
|
|
96
98
|
detect,
|
|
97
|
-
findSpans,
|
|
98
99
|
maskingEnd,
|
|
99
100
|
prefixesOf,
|
|
100
101
|
rawKeyPrefixPattern,
|
|
101
102
|
replaceSpans,
|
|
102
|
-
resolveOverlaps,
|
|
103
103
|
vendorPrefix
|
|
104
|
-
} from "./chunk-
|
|
104
|
+
} from "./chunk-5AYJGUA3.js";
|
|
105
105
|
import {
|
|
106
106
|
classifyFileState,
|
|
107
107
|
classifyOwnership,
|
|
@@ -5795,7 +5795,11 @@ function readInstalledVersion(projectRoot) {
|
|
|
5795
5795
|
return null;
|
|
5796
5796
|
}
|
|
5797
5797
|
}
|
|
5798
|
-
function
|
|
5798
|
+
function readGlobalVersion() {
|
|
5799
|
+
const recorded = read_lockfile(lockfile_path())?.["agent_config_version"];
|
|
5800
|
+
return typeof recorded === "string" && recorded.trim() !== "" ? recorded.trim().replace(/^v+/, "") : null;
|
|
5801
|
+
}
|
|
5802
|
+
function checkVersionAxis(projectRoot, resolvableNow, globalVersion = readGlobalVersion()) {
|
|
5799
5803
|
const id = "version-axis";
|
|
5800
5804
|
const pins = readVersionPins(projectRoot);
|
|
5801
5805
|
const installed = readInstalledVersion(projectRoot);
|
|
@@ -5803,7 +5807,16 @@ function checkVersionAxis(projectRoot, resolvableNow) {
|
|
|
5803
5807
|
return { id, status: "skipped", message: "no version pin and no install lockfile in this tree", remedy: "" };
|
|
5804
5808
|
}
|
|
5805
5809
|
const pinText = pins.length === 0 ? "pinned: none" : `pinned: ${pins.map((p) => `${p.version} (${p.file}${p.legacy ? ", LEGACY filename" : ""})`).join(" \xB7 ")}`;
|
|
5806
|
-
const line = `${pinText} \xB7 installed: ${installed ?? "unknown"} \xB7 resolvable now: ${resolvableNow ?? "unknown"}`;
|
|
5810
|
+
const line = `${pinText} \xB7 installed: ${installed ?? "unknown"} \xB7 global: ${globalVersion ?? "none"} \xB7 resolvable now: ${resolvableNow ?? "unknown"}`;
|
|
5811
|
+
const ahead = pins.filter((p) => globalVersion !== null && compare_versions(p.version, globalVersion) === 1);
|
|
5812
|
+
if (ahead.length > 0) {
|
|
5813
|
+
return {
|
|
5814
|
+
id,
|
|
5815
|
+
status: "warn",
|
|
5816
|
+
message: `${line} \u2014 the pin names ${ahead.map((p) => p.version).join(", ")} but the global install, which every session's hooks, rules and skills run from, is ${globalVersion}.`,
|
|
5817
|
+
remedy: "run `agent-config update` (it installs the pinned version globally) or `agent-config upgrade`"
|
|
5818
|
+
};
|
|
5819
|
+
}
|
|
5807
5820
|
const divergent = pins.filter((p) => installed !== null && p.version !== installed);
|
|
5808
5821
|
if (divergent.length === 0) {
|
|
5809
5822
|
return { id, status: "ok", message: line, remedy: "" };
|
|
@@ -6731,6 +6744,55 @@ function resumeBound(bound) {
|
|
|
6731
6744
|
return [...bound.slice(0, i), "-c", `sandbox_mode="${bound[i + 1]}"`, ...bound.slice(i + 2)];
|
|
6732
6745
|
}
|
|
6733
6746
|
|
|
6747
|
+
// src/scripts/_lib/egress_normalize.ts
|
|
6748
|
+
var FOREIGN = "43043543e4404414434454554564584bb50151b41041241541a41c41d41e4204214224234254054064083b13b53bf3bd3c13c53c73ba39139239539639739939a39c39d39f3a13a43a53a7";
|
|
6749
|
+
var LATIN = "aeopcyxsijhdqABEKMHOPCTYXSIJaeovpuxkABEZHIKMNOPTYX";
|
|
6750
|
+
var LATIN_TWIN = new Map([...LATIN].map((c, i) => [parseInt(FOREIGN.slice(i * 3, i * 3 + 3), 16), c]));
|
|
6751
|
+
var HIDDEN_UNICODE_RE = /[----\u{E0000}-\u{E007F}]/gu;
|
|
6752
|
+
function normalizeForDetection(text) {
|
|
6753
|
+
let out = "";
|
|
6754
|
+
const origin = [];
|
|
6755
|
+
let hidden = 0;
|
|
6756
|
+
let folded = 0;
|
|
6757
|
+
let at = 0;
|
|
6758
|
+
for (const ch of text) {
|
|
6759
|
+
HIDDEN_UNICODE_RE.lastIndex = 0;
|
|
6760
|
+
if (HIDDEN_UNICODE_RE.test(ch)) {
|
|
6761
|
+
hidden += 1;
|
|
6762
|
+
} else {
|
|
6763
|
+
const emit = LATIN_TWIN.get(ch.codePointAt(0)) ?? ch;
|
|
6764
|
+
if (emit !== ch) folded += 1;
|
|
6765
|
+
out += emit;
|
|
6766
|
+
for (let k = 0; k < emit.length; k += 1) origin.push(at);
|
|
6767
|
+
}
|
|
6768
|
+
at += ch.length;
|
|
6769
|
+
}
|
|
6770
|
+
return { text: out, origin, hidden, folded };
|
|
6771
|
+
}
|
|
6772
|
+
function detectWithExtent(text, rules = EGRESS_RULES) {
|
|
6773
|
+
const n = normalizeForDetection(text);
|
|
6774
|
+
if (n.hidden === 0 && n.folded === 0) return { spans: detect(text, rules), end: (s, read) => read(text, s) };
|
|
6775
|
+
const back = (i) => {
|
|
6776
|
+
const o = n.origin[i - 1];
|
|
6777
|
+
return o + (text.codePointAt(o) > 65535 ? 2 : 1);
|
|
6778
|
+
};
|
|
6779
|
+
const fwd = (o) => {
|
|
6780
|
+
let i = 0;
|
|
6781
|
+
while (i < n.origin.length && n.origin[i] < o) i += 1;
|
|
6782
|
+
return i;
|
|
6783
|
+
};
|
|
6784
|
+
return {
|
|
6785
|
+
spans: detect(n.text, rules).map((s) => ({ ...s, start: n.origin[s.start], end: back(s.end) })),
|
|
6786
|
+
end: (s, read) => {
|
|
6787
|
+
const e = read(n.text, { ...s, start: fwd(s.start), end: fwd(s.end) });
|
|
6788
|
+
return e === null ? null : back(e);
|
|
6789
|
+
}
|
|
6790
|
+
};
|
|
6791
|
+
}
|
|
6792
|
+
function detectNormalized(text, rules = EGRESS_RULES) {
|
|
6793
|
+
return detectWithExtent(text, rules).spans;
|
|
6794
|
+
}
|
|
6795
|
+
|
|
6734
6796
|
// src/scripts/_lib/egress_token.ts
|
|
6735
6797
|
import { createHmac, randomBytes } from "node:crypto";
|
|
6736
6798
|
var TOKEN_FP_LENGTH = 6;
|
|
@@ -6979,7 +7041,8 @@ var CouncilEgress = class {
|
|
|
6979
7041
|
* proven is replaced through the nearest END marker, as the line masks did.
|
|
6980
7042
|
*/
|
|
6981
7043
|
replace(text) {
|
|
6982
|
-
const
|
|
7044
|
+
const at = detectWithExtent(text, BUNDLE_RULES);
|
|
7045
|
+
const spans = at.spans.filter((s) => s.class === "credential" || this.opts.identifiers).map((s) => ({ ...s, end: at.end(s, maskingEnd) ?? s.end }));
|
|
6983
7046
|
spans.sort((a, b) => a.start - b.start);
|
|
6984
7047
|
const merged = [];
|
|
6985
7048
|
for (const s of spans) {
|
|
@@ -7008,7 +7071,7 @@ var CouncilEgress = class {
|
|
|
7008
7071
|
for (const value of this.replaced) {
|
|
7009
7072
|
if (body.includes(value)) return { reason: "replaced-value-present", what: "value replaced in this run" };
|
|
7010
7073
|
}
|
|
7011
|
-
for (const s of
|
|
7074
|
+
for (const s of detectNormalized(body)) {
|
|
7012
7075
|
const high = s.class === "credential" ? s.rule !== "generic-assignment" : s.validated && this.opts.identifiers;
|
|
7013
7076
|
if (high) return { reason: "high-confidence-finding", what: s.rule };
|
|
7014
7077
|
}
|