@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
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "provenance-mechanism.schema.json",
|
|
4
|
+
"title": "Provenance ledger mechanism decision",
|
|
5
|
+
"description": "One line of provenance/mechanisms.jsonl — a decision about one harvested mechanism: adopted, adapted, rejected, already present, missing, or deferred. Source-free by construction (council O5): no source id, no pin, no locator. What links a source to a mechanism lives in the local ledger under the user-global runtime/lineage/ and never in the tracked tree. Append-only; a later row for the same mechanism_id supersedes an earlier one. Contract: provenance/README.md. Enforced by src/scripts/lint_harvest_provenance.ts.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["mechanism_id", "verdict", "decided_at"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"mechanism_id": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
|
|
13
|
+
"description": "Kebab-case slug naming the mechanism. A harvest citation marker may cite it; for a mechanism seeded from harvests.jsonl it equals the harvest_id."
|
|
14
|
+
},
|
|
15
|
+
"verdict": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"enum": ["adopt", "adapt", "reject", "already", "gap", "deferred"],
|
|
18
|
+
"description": "adopt|adapt — realised in this repo; reject — decided against; already — present before the harvest; gap — wanted and missing; deferred — wanted, parked."
|
|
19
|
+
},
|
|
20
|
+
"realised_in": {
|
|
21
|
+
"type": "array",
|
|
22
|
+
"minItems": 1,
|
|
23
|
+
"items": { "type": "string" },
|
|
24
|
+
"description": "Repo-relative paths where the mechanism lives, each optionally suffixed ':<line>'. Required for adopt and adapt; every path must exist."
|
|
25
|
+
},
|
|
26
|
+
"roadmap": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"description": "Repo-relative path of the roadmap that owns a gap or deferred mechanism, or the literal 'open' when nothing owns it yet."
|
|
29
|
+
},
|
|
30
|
+
"decided_at": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
|
|
33
|
+
"description": "ISO-8601 date (YYYY-MM-DD) of the decision."
|
|
34
|
+
},
|
|
35
|
+
"reason": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"minLength": 3,
|
|
38
|
+
"description": "Why. Required for reject."
|
|
39
|
+
},
|
|
40
|
+
"reopen_if": {
|
|
41
|
+
"type": "string",
|
|
42
|
+
"minLength": 3,
|
|
43
|
+
"description": "The condition under which a rejection or deferral is reconsidered."
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
* It is fail-open on every path and returns 0 on every path, including an
|
|
33
33
|
* unreadable state file, an unwritable state directory and a missing changelog.
|
|
34
34
|
*/
|
|
35
|
+
import { randomUUID } from 'node:crypto';
|
|
35
36
|
import * as fs from 'node:fs';
|
|
36
37
|
import * as path from 'node:path';
|
|
37
38
|
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
@@ -48,6 +49,7 @@ import { parse_version } from './_lib/version_order.js';
|
|
|
48
49
|
import * as user_global_paths from './_lib/user_global_paths.js';
|
|
49
50
|
import { readHookStdin } from './hooks/hook_stdin.js';
|
|
50
51
|
import { is_replay_mode } from './hooks/state_io.js';
|
|
52
|
+
import { hostShowsUserNotice, readNoticeReceipt, USER_NOTICE_ID_KEY, USER_NOTICE_KEY, type NoticeReceipt } from './hooks/user_notice.js';
|
|
51
53
|
|
|
52
54
|
export const CONCERN = 'update-notice';
|
|
53
55
|
export const NOTICE_STATE_FILENAME = 'update-notice.json';
|
|
@@ -73,6 +75,15 @@ export const NOTICE_STATE_SCHEMA = 1;
|
|
|
73
75
|
export interface NoticeState {
|
|
74
76
|
readonly staged: string | null;
|
|
75
77
|
readonly last_seen_installed: string | null;
|
|
78
|
+
/**
|
|
79
|
+
* A notice handed to the dispatcher's user channel and not yet confirmed:
|
|
80
|
+
* the session it was handed over in, the id it was handed over with, and the
|
|
81
|
+
* installed version it reported. It becomes `last_seen_installed` only when
|
|
82
|
+
* the dispatcher's receipt names that session AND that id
|
|
83
|
+
* (`hooks/user_notice.ts`) — an older receipt from the same session is a
|
|
84
|
+
* receipt for another notice. Until then the notice is due again.
|
|
85
|
+
*/
|
|
86
|
+
readonly pending?: { readonly session_id: string; readonly notice_id: string; readonly installed: string };
|
|
76
87
|
}
|
|
77
88
|
|
|
78
89
|
export function readNoticeState(statePath: string | null): NoticeState {
|
|
@@ -82,12 +93,25 @@ export function readNoticeState(statePath: string | null): NoticeState {
|
|
|
82
93
|
const o = raw !== null && typeof raw === 'object' && !Array.isArray(raw) ? (raw as Record<string, unknown>) : {};
|
|
83
94
|
if (o['schema'] !== undefined && o['schema'] !== NOTICE_STATE_SCHEMA) return { staged: null, last_seen_installed: null };
|
|
84
95
|
const str = (v: unknown): string | null => (typeof v === 'string' && parse_version(v.trim()) !== null ? v.trim() : null);
|
|
85
|
-
|
|
96
|
+
const p = o['pending'] as Record<string, unknown> | null | undefined;
|
|
97
|
+
const installed = str(p?.['installed']);
|
|
98
|
+
const pending =
|
|
99
|
+
typeof p?.['session_id'] === 'string' && typeof p['notice_id'] === 'string' && installed !== null
|
|
100
|
+
? { session_id: p['session_id'], notice_id: p['notice_id'], installed }
|
|
101
|
+
: undefined;
|
|
102
|
+
return { staged: str(o['staged']), last_seen_installed: str(o['last_seen_installed']), ...(pending ? { pending } : {}) };
|
|
86
103
|
} catch {
|
|
87
104
|
return { staged: null, last_seen_installed: null };
|
|
88
105
|
}
|
|
89
106
|
}
|
|
90
107
|
|
|
108
|
+
/** The state with a pending notice promoted, when the dispatcher's receipt names its session and its id. */
|
|
109
|
+
export function confirmDelivered(state: NoticeState, receipt: NoticeReceipt | null): NoticeState {
|
|
110
|
+
const p = state.pending;
|
|
111
|
+
if (p === undefined || receipt === null || !receipt.notice_id || receipt.notice_id !== p.notice_id || receipt.session_id !== p.session_id) return state;
|
|
112
|
+
return { staged: state.staged, last_seen_installed: p.installed };
|
|
113
|
+
}
|
|
114
|
+
|
|
91
115
|
export function writeNoticeState(statePath: string, state: NoticeState): void {
|
|
92
116
|
try {
|
|
93
117
|
write_atomic(statePath, `${JSON.stringify({ schema: NOTICE_STATE_SCHEMA, ...state }, null, 2)}\n`);
|
|
@@ -138,11 +162,11 @@ function readText(p: string): string {
|
|
|
138
162
|
}
|
|
139
163
|
}
|
|
140
164
|
|
|
141
|
-
function
|
|
165
|
+
function envelopeField(raw: string, key: string): string | null {
|
|
142
166
|
try {
|
|
143
167
|
const doc: unknown = JSON.parse(raw);
|
|
144
|
-
const
|
|
145
|
-
return typeof
|
|
168
|
+
const value = (doc as Record<string, unknown> | null)?.[key];
|
|
169
|
+
return typeof value === 'string' && value.trim() !== '' ? value.trim() : null;
|
|
146
170
|
} catch {
|
|
147
171
|
return null;
|
|
148
172
|
}
|
|
@@ -160,6 +184,14 @@ export interface NoticeDeps {
|
|
|
160
184
|
readonly throttlePath: string;
|
|
161
185
|
readonly registerDir: string;
|
|
162
186
|
readonly err: { write(text: string): void };
|
|
187
|
+
/**
|
|
188
|
+
* The dispatcher's user channel (`hooks/user_notice.ts`), set only when the
|
|
189
|
+
* host shows a notice to the user. The lines then go there as one reply and
|
|
190
|
+
* nothing goes to stderr, which every host discards.
|
|
191
|
+
*/
|
|
192
|
+
readonly notice?: { write(text: string): void };
|
|
193
|
+
/** The dispatcher's delivery receipt for this concern, read only on the `notice` path. */
|
|
194
|
+
readonly receipt?: () => NoticeReceipt | null;
|
|
163
195
|
}
|
|
164
196
|
|
|
165
197
|
/**
|
|
@@ -173,7 +205,7 @@ export function runNotice(deps: NoticeDeps, apply = true): NoticeOutcome {
|
|
|
173
205
|
|
|
174
206
|
const probe = deps.probeStatePath === null ? {} : readJson(deps.probeStatePath);
|
|
175
207
|
const seen = probe['last_seen_version'];
|
|
176
|
-
const state = readNoticeState(deps.noticeStatePath);
|
|
208
|
+
const state = confirmDelivered(readNoticeState(deps.noticeStatePath), deps.receipt?.() ?? null);
|
|
177
209
|
|
|
178
210
|
const outcome = updateNotice({
|
|
179
211
|
installed,
|
|
@@ -200,6 +232,23 @@ export function runNotice(deps: NoticeDeps, apply = true): NoticeOutcome {
|
|
|
200
232
|
return outcome;
|
|
201
233
|
}
|
|
202
234
|
|
|
235
|
+
// Through the host, a notice counts as shown only once the dispatcher's
|
|
236
|
+
// receipt names this session and this notice's id; until then it stays
|
|
237
|
+
// pending and is said again.
|
|
238
|
+
if (deps.notice !== undefined) {
|
|
239
|
+
const noticeId = randomUUID();
|
|
240
|
+
if (outcome.lines.length > 0) {
|
|
241
|
+
deps.notice.write(JSON.stringify({ [USER_NOTICE_KEY]: outcome.lines.join('\n'), [USER_NOTICE_ID_KEY]: noticeId }));
|
|
242
|
+
}
|
|
243
|
+
writeNoticeState(deps.noticeStatePath, {
|
|
244
|
+
staged: outcome.stage,
|
|
245
|
+
last_seen_installed: state.last_seen_installed,
|
|
246
|
+
...(outcome.lines.length > 0 && deps.sessionId
|
|
247
|
+
? { pending: { session_id: deps.sessionId, notice_id: noticeId, installed } }
|
|
248
|
+
: {}),
|
|
249
|
+
});
|
|
250
|
+
return outcome;
|
|
251
|
+
}
|
|
203
252
|
for (const line of outcome.lines) deps.err.write(`[update] ${line}\n`);
|
|
204
253
|
writeNoticeState(deps.noticeStatePath, { staged: outcome.stage, last_seen_installed: installed });
|
|
205
254
|
return outcome;
|
|
@@ -214,6 +263,19 @@ export function runNotice(deps: NoticeDeps, apply = true): NoticeOutcome {
|
|
|
214
263
|
export function noticeOncePerDay(deps: NoticeDeps): NoticeOutcome | null {
|
|
215
264
|
const dry = runNotice(deps, false);
|
|
216
265
|
if (dry.suppressed !== null && !RECONCILE_REASONS.has(dry.suppressed)) return null;
|
|
266
|
+
if (deps.notice !== undefined) {
|
|
267
|
+
// Through the host the day throttle is a DELIVERED notice today, so a
|
|
268
|
+
// notice the dispatcher dropped is said again at the next session.
|
|
269
|
+
const receipt = deps.receipt?.() ?? null;
|
|
270
|
+
if (receipt !== null && localDay(new Date(receipt.at)) === localDay(new Date())) {
|
|
271
|
+
const stored = readNoticeState(deps.noticeStatePath);
|
|
272
|
+
const confirmed = confirmDelivered(stored, receipt);
|
|
273
|
+
if (confirmed !== stored) writeNoticeState(deps.noticeStatePath, confirmed);
|
|
274
|
+
// Another session's receipt never throttles a notice still pending.
|
|
275
|
+
if (confirmed.pending === undefined) return null;
|
|
276
|
+
}
|
|
277
|
+
return runNotice(deps);
|
|
278
|
+
}
|
|
217
279
|
if (ranToday(deps.throttlePath)) return null;
|
|
218
280
|
const outcome = runNotice(deps);
|
|
219
281
|
stampToday(deps.throttlePath);
|
|
@@ -261,11 +323,17 @@ export function main(argv?: string[]): number {
|
|
|
261
323
|
// The throttle stamp is a WRITE, so it comes after the decision that
|
|
262
324
|
// this context may be written in at all — AC-2 asks for zero writes
|
|
263
325
|
// under CI, a non-TTY, a source checkout and the opt-out.
|
|
326
|
+
// Every host runs this on pipes, so a TTY says nothing about whether the
|
|
327
|
+
// user will see the notice; a host with a verified user channel does.
|
|
328
|
+
// Through the host a notice is confirmed by a receipt naming its session,
|
|
329
|
+
// so without a session id there is nothing to confirm it by: say nothing.
|
|
330
|
+
const viaHost = envelopeField(raw, 'session_id') !== null && hostShowsUserNotice(envelopeField(raw, 'platform'));
|
|
264
331
|
const deps: NoticeDeps = {
|
|
265
332
|
packageRoot,
|
|
266
|
-
sessionId:
|
|
333
|
+
sessionId: envelopeField(raw, 'session_id'),
|
|
267
334
|
env: process.env,
|
|
268
|
-
isTty: Boolean(process.stderr.isTTY) || Boolean(process.stdout.isTTY),
|
|
335
|
+
isTty: viaHost || Boolean(process.stderr.isTTY) || Boolean(process.stdout.isTTY),
|
|
336
|
+
...(viaHost ? { notice: process.stdout, receipt: () => readNoticeReceipt(CONCERN) } : {}),
|
|
269
337
|
mode,
|
|
270
338
|
probeStatePath: user_global_paths.resolve_with_fallback(STATE_FILENAME),
|
|
271
339
|
noticeStatePath: user_global_paths.write_target(NOTICE_STATE_FILENAME),
|
|
@@ -10,9 +10,9 @@ with no manual parser install (ADR-259).
|
|
|
10
10
|
|
|
11
11
|
`tree-sitter-wasms` carries 36 grammars (49 MiB on disk). Depending on it at
|
|
12
12
|
runtime would hand every consumer all 36, which is the option ADR-259 §
|
|
13
|
-
Alternatives rejects on exactly that measurement. Only the
|
|
13
|
+
Alternatives rejects on exactly that measurement. Only the eight grammars below
|
|
14
14
|
are loadable by the engine — `GRAMMAR_WASM` in `src/scripts/code_graph/types.ts`
|
|
15
|
-
has
|
|
15
|
+
has eight entries — so the other 28 would be payload with no reader. Vue needs no
|
|
16
16
|
grammar of its own: the extractor blanks a component's template and parses its
|
|
17
17
|
`<script>` with the TypeScript grammar.
|
|
18
18
|
|
|
@@ -30,8 +30,9 @@ the tarball; the loader reads them from disk.
|
|
|
30
30
|
| go | `tree-sitter-go.wasm` | `9963ca89b616eaf04b08a43bc1fb0f07b85395bec313330851f1f1ead2f755b6` |
|
|
31
31
|
| java | `tree-sitter-java.wasm` | `637aac4415fb39a211a4f4292d63c66b5ce9c32fa2cd35464af4f681d91b9a1f` |
|
|
32
32
|
| csharp | `tree-sitter-c_sharp.wasm` | `6266a7e32d68a3459104d994dc848df15d5672b0ea8e86d327274b694f8e6991` |
|
|
33
|
+
| ruby | `tree-sitter-ruby.wasm` | `93a5022855314cdb45458c7bb026a24a0ebc3a5ff6439e542e881f14dfa13a39` |
|
|
33
34
|
|
|
34
|
-
All
|
|
35
|
+
All eight are built against **grammar ABI 14** (`EXPECTED_GRAMMAR_ABI` in
|
|
35
36
|
`src/scripts/code_graph/types.ts`). The loader asserts the ABI on every load, so
|
|
36
37
|
a drifted grammar fails loudly rather than parsing wrongly.
|
|
37
38
|
|
|
@@ -39,7 +40,7 @@ a drifted grammar fails loudly rather than parsing wrongly.
|
|
|
39
40
|
|
|
40
41
|
Copied byte-for-byte from `tree-sitter-wasms@0.1.13`
|
|
41
42
|
(<https://github.com/Gregoor/tree-sitter-wasms>, Unlicense), which compiles them
|
|
42
|
-
from the upstream `tree-sitter/tree-sitter-{php,typescript,javascript}` grammars
|
|
43
|
+
from the upstream `tree-sitter/tree-sitter-{php,typescript,javascript,python,go,java,c-sharp,ruby}` grammars
|
|
43
44
|
(MIT). The compiled artifacts are derivatives of the MIT grammar sources, so
|
|
44
45
|
they are annotated MIT in `REUSE.toml` and credited in `CREDITS.md`.
|
|
45
46
|
|
|
@@ -74,7 +75,7 @@ The pair is ABI-coupled and must move together:
|
|
|
74
75
|
|
|
75
76
|
```bash
|
|
76
77
|
npm i -D web-tree-sitter@<v> tree-sitter-wasms@<v>
|
|
77
|
-
for g in php typescript javascript python go java c_sharp; do
|
|
78
|
+
for g in php typescript javascript python go java c_sharp ruby; do
|
|
78
79
|
cp node_modules/tree-sitter-wasms/out/tree-sitter-$g.wasm src/vendor/grammars/
|
|
79
80
|
done
|
|
80
81
|
shasum -a 256 src/vendor/grammars/*.wasm # update the table above
|
|
@@ -82,7 +83,7 @@ shasum -a 256 src/vendor/grammars/*.wasm # update the table above
|
|
|
82
83
|
|
|
83
84
|
Then update, in the same change:
|
|
84
85
|
|
|
85
|
-
- the
|
|
86
|
+
- the eight entries in `src/config/packed-binary-manifest.json` (they are
|
|
86
87
|
path-, sha256- and size-bound, so any refresh invalidates them by design).
|
|
87
88
|
This used to name `BINARY_PAYLOAD_EXCEPTIONS` in `src/scripts/check_pack_size.ts`,
|
|
88
89
|
a constant that no longer exists — `grep -rn BINARY_PAYLOAD_EXCEPTIONS` returned
|
|
Binary file
|
|
File without changes
|
|
File without changes
|