@henols/vice-mcp 0.2.0 → 0.2.2
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/README.md +2 -1
- package/THIRD-PARTY-NOTICES.md +1 -1
- package/anno-acme-ident.ts +97 -0
- package/anno-cli.ts +1465 -0
- package/anno-confidence.ts +233 -0
- package/anno-coverage.ts +2465 -0
- package/anno-d64.ts +310 -0
- package/anno-derive.ts +590 -0
- package/anno-details.ts +169 -0
- package/anno-enum-gen.ts +533 -0
- package/anno-export-asm.ts +1310 -0
- package/anno-index.ts +150 -0
- package/anno-memmap-render.ts +672 -0
- package/anno-regbits-gen.ts +421 -0
- package/anno-regbits.json +1370 -0
- package/anno-register.ts +240 -0
- package/anno-store.ts +3486 -0
- package/anno-symbols.ts +266 -0
- package/anno-tools.ts +2111 -0
- package/anno-types.ts +1636 -0
- package/block-class.ts +201 -0
- package/build.ts +1 -1
- package/capability-registry.ts +3 -1
- package/disasm-decoder.ts +14 -14
- package/disasm-opcodes.ts +4 -4
- package/disasm-renderer.ts +2 -2
- package/hostpath.ts +1 -1
- package/install-resources.ts +1 -1
- package/package.json +23 -3
- package/prg-image.ts +119 -0
- package/repo-root.ts +20 -5
- package/resources/broker-launch.mjs +8 -4
- package/resources/vice-launcher.sh +3 -3
- package/stock-address.ts +5 -5
- package/stock-cia.ts +2 -2
- package/stock-condition.ts +7 -7
- package/stock-connect.ts +1 -1
- package/stock-dispatch.ts +35 -5
- package/stock-execution.ts +5 -3
- package/stock-input.ts +9 -9
- package/stock-machine.ts +17 -6
- package/stock-protocol.ts +16 -11
- package/stock-registers.ts +54 -29
- package/stock-sprites.ts +3 -3
- package/stock-symbols.ts +33 -9
- package/stock-timing.ts +1 -1
- package/stock-vicii.ts +1 -1
- package/version.ts +1 -1
- package/vice-proxy.ts +168 -0
package/anno-register.ts
ADDED
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
// anno-register.ts -- the ONE authoritative, committed record of WHY a verb on
|
|
2
|
+
// the `anno_*` surface exists when the Phase 19 upstream procedure manifest
|
|
3
|
+
// does not classify it, and of the one verb whose route deliberately answers
|
|
4
|
+
// something OTHER than what the manifest's upstream contract described.
|
|
5
|
+
//
|
|
6
|
+
// WHY THIS FILE EXISTS (MCP-01, D-08). `MCP-01`'s whole claim is that the tool
|
|
7
|
+
// surface is DERIVED rather than CHOSEN: every verb the manifest disposes
|
|
8
|
+
// `curated` or `adapt-to-address-input` has a route, every verb it disposes
|
|
9
|
+
// `omit` is absent, and the verb with zero callers anywhere is not carried.
|
|
10
|
+
// `anno-derivation.test.ts` checks that half mechanically. This file is the
|
|
11
|
+
// OTHER half, and without it the derivation is a half-truth: four verbs on the
|
|
12
|
+
// surface appear in no manifest procedure at all, and one of them --
|
|
13
|
+
// `anno_search` -- is POSITIVELY REQUIRED by `STORE-06`. A derivation with an
|
|
14
|
+
// unrecorded remainder is not a derivation; it is a derivation plus an
|
|
15
|
+
// unwritten allow-list.
|
|
16
|
+
//
|
|
17
|
+
// D-08 rejected the alternative explicitly, and the reason is worth restating
|
|
18
|
+
// where it will be read: the manifest could have been amended to carry these
|
|
19
|
+
// four names, and must not be. It describes UPSTREAM at a pinned commit, and it
|
|
20
|
+
// carries its own re-sync trigger and per-procedure sha256 digests. Writing this
|
|
21
|
+
// project's verbs into it makes it describe US, and the next re-hash against a
|
|
22
|
+
// real upstream clone would then be comparing a record that had been quietly
|
|
23
|
+
// edited to agree with the thing it was supposed to audit.
|
|
24
|
+
//
|
|
25
|
+
// WHAT THIS IS THE ONE AUTHORITATIVE PLACE FOR:
|
|
26
|
+
// - every surface verb the manifest does not classify, with the named
|
|
27
|
+
// consumers and the cited requirement ids that justify its existence;
|
|
28
|
+
// - every surface verb the manifest DOES classify but whose route answers
|
|
29
|
+
// something other than upstream's contract, recorded as a deviation so a
|
|
30
|
+
// later reader does not mistake a deliberate reporting route for an
|
|
31
|
+
// oversight.
|
|
32
|
+
// Nothing else in the repo may hold a second copy of this judgement. A consumer
|
|
33
|
+
// that needs it in another shape imports `ANNO_VERB_REGISTER` and reshapes it.
|
|
34
|
+
//
|
|
35
|
+
// WHAT MAKES THIS AN OBLIGATION RATHER THAN A DOCUMENT: `anno-register.test.ts`
|
|
36
|
+
// enumerates the surface, subtracts the manifest-classified names, and FAILS --
|
|
37
|
+
// naming the offending verb -- the moment a verb has no entry. D-08's wording is
|
|
38
|
+
// literal and is the wording the failure uses: a verb added later with no named
|
|
39
|
+
// consumer FAILS rather than being reviewed.
|
|
40
|
+
//
|
|
41
|
+
// WHAT NOT TO DO, named concretely:
|
|
42
|
+
// - AN ENTRY CITING NO REQUIREMENT ID AND NO CONSUMER IS NOT AN ENTRY. The
|
|
43
|
+
// enforcing test reports it by name. Do not "temporarily" add a verb with a
|
|
44
|
+
// rationale and nothing else; a rationale is prose, and prose is what this
|
|
45
|
+
// register exists to stop being the whole basis.
|
|
46
|
+
// - Do not let this grow into an unbounded allow-list. Every entry added here
|
|
47
|
+
// makes "derived from the manifest" a little more decorative. Four entries
|
|
48
|
+
// and one deviation is the measured state at the time of writing; a fifth is
|
|
49
|
+
// a decision, not paperwork.
|
|
50
|
+
// - CITATION DISCIPLINE, carried over verbatim in intent from
|
|
51
|
+
// `module-classification.ts`: `path` is ALWAYS repository-root-relative,
|
|
52
|
+
// never relative to this directory, because consumers legitimately live
|
|
53
|
+
// under `.planning/`, `scripts/` and `src/skills/` as well as beside this
|
|
54
|
+
// file. `symbol` names what the consumer actually TAKES from the verb (an
|
|
55
|
+
// imported binding, a store entry point, or -- for a documentation consumer
|
|
56
|
+
// -- the identifier the cited line names); it is a CITATION, never a
|
|
57
|
+
// justification. `line` is OPTIONAL AND ADVISORY: where present the
|
|
58
|
+
// enforcing test asserts that line of that file contains `symbol` and never
|
|
59
|
+
// trusts the number, so OMIT IT RATHER THAN GUESS.
|
|
60
|
+
//
|
|
61
|
+
// Deliberately a plain `.ts` module and never a `.test.ts` file, for the reason
|
|
62
|
+
// `module-classification.ts` gives: importing a `.test.ts` module for its
|
|
63
|
+
// exports also re-runs every `test(...)` it registers, as an import side effect.
|
|
64
|
+
// This module imports nothing at all.
|
|
65
|
+
|
|
66
|
+
/** One cited consumer of a registered verb. See the header's citation
|
|
67
|
+
* discipline: `path` is repository-root-relative, `symbol` is a citation and
|
|
68
|
+
* never a justification, and `line` is optional and advisory -- omit it rather
|
|
69
|
+
* than guess. */
|
|
70
|
+
export interface AnnoVerbConsumer {
|
|
71
|
+
path: string;
|
|
72
|
+
symbol: string;
|
|
73
|
+
line?: number;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* The two reasons a verb is in this register, kept DISTINGUISHABLE on purpose:
|
|
78
|
+
* a reader must be able to tell "this verb has no manifest classification" from
|
|
79
|
+
* "this verb has one and we answered it differently".
|
|
80
|
+
*
|
|
81
|
+
* - "unclassified": the manifest's five procedures never mention the upstream
|
|
82
|
+
* name this verb derives from, so the derivation says nothing about it. Its
|
|
83
|
+
* existence rests entirely on the consumers and requirement ids below.
|
|
84
|
+
* - "manifest-deviation": the manifest DOES classify it, and it has a route,
|
|
85
|
+
* so the derivation check is satisfied -- but the route answers something
|
|
86
|
+
* other than what upstream's contract described. Recorded so the difference
|
|
87
|
+
* is a decision on the record rather than something a reader discovers by
|
|
88
|
+
* calling the verb and being surprised.
|
|
89
|
+
*/
|
|
90
|
+
export type AnnoVerbEntryKind = "unclassified" | "manifest-deviation";
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* One registered verb.
|
|
94
|
+
*
|
|
95
|
+
* `verb` is the EXACT surface tool name, including the family prefix, because
|
|
96
|
+
* the enforcing test compares it as a literal string against
|
|
97
|
+
* `ANNO_TOOL_DEFINITIONS[].name` in both directions.
|
|
98
|
+
*
|
|
99
|
+
* `consumers` and `requirements` are the BASIS. At least one of each is
|
|
100
|
+
* required -- not "one or the other", which is the weaker rule
|
|
101
|
+
* `module-classification.ts` could afford because its subject was a module that
|
|
102
|
+
* already existed. A verb is a public surface commitment; D-08 asks for a named
|
|
103
|
+
* consumer AND a cited requirement, and the enforcing test asks for both.
|
|
104
|
+
*
|
|
105
|
+
* `rationale` states, in terms of what the verb DOES, why it is on the surface.
|
|
106
|
+
*
|
|
107
|
+
* `note` carries anything the basis cannot say -- a consequence measured
|
|
108
|
+
* elsewhere, or the shape of the recorded finding this entry discharges.
|
|
109
|
+
*/
|
|
110
|
+
export interface AnnoVerbRegisterEntry {
|
|
111
|
+
verb: string;
|
|
112
|
+
kind: AnnoVerbEntryKind;
|
|
113
|
+
consumers: readonly AnnoVerbConsumer[];
|
|
114
|
+
requirements: readonly string[];
|
|
115
|
+
rationale: string;
|
|
116
|
+
note?: string;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export const ANNO_VERB_REGISTER: readonly AnnoVerbRegisterEntry[] = Object.freeze([
|
|
120
|
+
// --- unclassified: the manifest's five procedures never name these ---
|
|
121
|
+
{
|
|
122
|
+
verb: "anno_add_scope",
|
|
123
|
+
kind: "unclassified",
|
|
124
|
+
consumers: [
|
|
125
|
+
{ path: "src/mcp/vice/anno-store.ts", symbol: "addScope" },
|
|
126
|
+
{ path: "src/mcp/vice/anno-tools.ts", symbol: "anno_add_scope" },
|
|
127
|
+
],
|
|
128
|
+
requirements: ["STORE-01"],
|
|
129
|
+
rationale:
|
|
130
|
+
"Scopes are one of the five things STORE-01 requires the store to hold -- labels, comments, per-range " +
|
|
131
|
+
"data typing, scopes and project enums -- and four of those five reached the surface through a " +
|
|
132
|
+
"manifest-classified verb. Scopes did not, because the absorbed upstream procedures never used them: " +
|
|
133
|
+
"they are how a routine's local symbols are kept out of the global namespace, which is an EXPORT-side " +
|
|
134
|
+
"concern the procedures had no reason to touch. Without this verb the store persists a table no caller " +
|
|
135
|
+
"on this surface can write, which is a stored capability with no route -- exactly the shape STORE-01 " +
|
|
136
|
+
"was written against.",
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
verb: "anno_remove_scope",
|
|
140
|
+
kind: "unclassified",
|
|
141
|
+
consumers: [
|
|
142
|
+
{ path: "src/mcp/vice/anno-store.ts", symbol: "removeScope" },
|
|
143
|
+
{ path: ".planning/phases/28-the-store-core/28-REVIEW.md", symbol: "removeScope" },
|
|
144
|
+
],
|
|
145
|
+
requirements: ["STORE-01"],
|
|
146
|
+
rationale:
|
|
147
|
+
"The inverse of the overlap refusal, and the register's clearest case of a verb existing because a " +
|
|
148
|
+
"recorded finding demanded it rather than because a procedure used it. 28-REVIEW's round-6 WARNING is " +
|
|
149
|
+
"the named consumer: the store refuses any scope overlapping an existing one, and had no removal verb " +
|
|
150
|
+
"for a scope, a label, a comment, a cross-reference or an enum. A write verb whose mistakes cannot be " +
|
|
151
|
+
"undone is a data-loss surface even when every individual refusal is correct, so the inverse ships in " +
|
|
152
|
+
"the same phase as the refusal.",
|
|
153
|
+
note:
|
|
154
|
+
"The measured consequence, which is why this is not merely tidiness: `anno_add_scope($1000, $ffff)` -- " +
|
|
155
|
+
"ONE TRANSPOSED END, arriving from a transport whose validator returns its input unchanged -- makes " +
|
|
156
|
+
"every future scope from $1000 upward permanently unaddable. The only route back was `revertTo`, and " +
|
|
157
|
+
"the snapshot ring is bounded at MAX_SNAPSHOT_REVISIONS: 32 further writes and the store's own " +
|
|
158
|
+
"published floor refuses, by name, the revision that would undo it.",
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
verb: "anno_search",
|
|
162
|
+
kind: "unclassified",
|
|
163
|
+
consumers: [
|
|
164
|
+
{ path: "src/mcp/vice/anno-derive.ts", symbol: "searchAnnotations" },
|
|
165
|
+
{ path: "src/mcp/vice/anno-tools.ts", symbol: "anno_search" },
|
|
166
|
+
// Re-pointed at the v0.7.0 close, 2026-09-01: `/gsd-complete-milestone`
|
|
167
|
+
// `git rm`s `.planning/REQUIREMENTS.md` and archives it under
|
|
168
|
+
// `milestones/<version>-REQUIREMENTS.md`. The cited text is unchanged --
|
|
169
|
+
// this names the file STORE-06 is actually declared in today, so
|
|
170
|
+
// DIRECTION 5's "every path exists" check stays a real check.
|
|
171
|
+
{ path: ".planning/milestones/v0.7.0-REQUIREMENTS.md", symbol: "STORE-06" },
|
|
172
|
+
],
|
|
173
|
+
requirements: ["STORE-06"],
|
|
174
|
+
rationale:
|
|
175
|
+
"POSITIVELY REQUIRED by STORE-06, which names search across labels, comments and instructions as one " +
|
|
176
|
+
"of its two halves and says in terms that it is built on the surviving decoders with the old route " +
|
|
177
|
+
"gone rather than kept as a fallback. The manifest cannot classify it: the upstream call it derives " +
|
|
178
|
+
"from appears in no absorbed procedure, so the derivation is silent and the requirement is the whole " +
|
|
179
|
+
"basis. That is the second of the two admissible bases and not a weaker one -- it is the strongest " +
|
|
180
|
+
"kind of entry this register holds, because a requirement id is checkable against a committed document " +
|
|
181
|
+
"whereas a consumer can be deleted by the next refactor.",
|
|
182
|
+
note:
|
|
183
|
+
"This entry is load-bearing for a check in another file. The skill-coverage script's non-vacuity " +
|
|
184
|
+
"control is re-pointed onto this verb (C-5): it is STORE-06's named requirement AND it lives here, so " +
|
|
185
|
+
"if it ever silently leaves the surface, BOTH the coverage control and this register's completeness " +
|
|
186
|
+
"relation fire. Do not remove this entry to make a count come out.",
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
verb: "anno_update_project_enum",
|
|
190
|
+
kind: "unclassified",
|
|
191
|
+
consumers: [
|
|
192
|
+
{ path: "src/mcp/vice/anno-store.ts", symbol: "updateProjectEnum" },
|
|
193
|
+
{ path: "src/mcp/vice/anno-tools.ts", symbol: "anno_update_project_enum" },
|
|
194
|
+
],
|
|
195
|
+
requirements: ["STORE-01"],
|
|
196
|
+
rationale:
|
|
197
|
+
"Project enums are STORE-01's fifth stored kind. The manifest classifies creation and application " +
|
|
198
|
+
"(both `curated`, from the routine and symbol procedures) but not update, because the absorbed " +
|
|
199
|
+
"procedures create an enum once from a fresh reading and never revise one. This project does revise " +
|
|
200
|
+
"them: the register-bit and enum generators emit a variant set from a data file, and a regenerated " +
|
|
201
|
+
"set must be able to REPLACE an earlier one rather than collide with it. Without update, the only " +
|
|
202
|
+
"route to a corrected variant set is delete-and-recreate -- and delete is the one verb with zero " +
|
|
203
|
+
"callers anywhere, which MCP-01 requires this surface not to carry.",
|
|
204
|
+
note:
|
|
205
|
+
"This is the entry that explains why the absent delete verb costs nothing. The delete route existed " +
|
|
206
|
+
"upstream to support exactly the delete-and-recreate cycle update makes unnecessary; carrying update " +
|
|
207
|
+
"instead is what lets MCP-01's zero-caller clause hold without losing a capability.",
|
|
208
|
+
},
|
|
209
|
+
|
|
210
|
+
// --- manifest-deviation: classified, routed, and answering differently ---
|
|
211
|
+
{
|
|
212
|
+
verb: "anno_save_project",
|
|
213
|
+
kind: "manifest-deviation",
|
|
214
|
+
consumers: [
|
|
215
|
+
{ path: "src/mcp/vice/anno-store.ts", symbol: "currentRevision" },
|
|
216
|
+
{ path: "src/mcp/vice/anno-tools.ts", symbol: "anno_save_project" },
|
|
217
|
+
],
|
|
218
|
+
requirements: ["STORE-04", "MCP-04"],
|
|
219
|
+
rationale:
|
|
220
|
+
"The manifest disposes this verb `curated` in two procedures and it has a route, so the derivation " +
|
|
221
|
+
"check is satisfied -- but THE ROUTE PERFORMS NO WRITE. It reports the store's current revision and " +
|
|
222
|
+
"states the no-write property in its own body. Upstream's contract was an explicit flush of unsaved " +
|
|
223
|
+
"editor state; this store has none, because STORE-04 makes every mutating verb commit and fsync its " +
|
|
224
|
+
"own write before it returns. Durability belongs to the store, not to a verb an agent has to remember " +
|
|
225
|
+
"to call. Recorded HERE, as a deviation, because a route that reports rather than writes is precisely " +
|
|
226
|
+
"what a later reader would otherwise diagnose as an oversight and 'fix'.",
|
|
227
|
+
note:
|
|
228
|
+
"Routed honestly rather than refused, which is the MCP-04 half. Refusing an absorbed procedure's own " +
|
|
229
|
+
"step would break the procedures this project inherited for no gain; answering it with the revision " +
|
|
230
|
+
"gives the caller something genuinely useful -- the value a subsequent compare-and-swap needs, and the " +
|
|
231
|
+
"confirmation that a pass advanced the store as far as expected.",
|
|
232
|
+
},
|
|
233
|
+
]);
|
|
234
|
+
|
|
235
|
+
/** The registered entry for a verb, or `undefined`. Exported so a consumer
|
|
236
|
+
* asking "why is this verb here?" reads the record rather than re-deriving it,
|
|
237
|
+
* and so the enforcing test and any later caller share one lookup. */
|
|
238
|
+
export function annoRegisterEntryFor(verb: string): AnnoVerbRegisterEntry | undefined {
|
|
239
|
+
return ANNO_VERB_REGISTER.find((entry) => entry.verb === verb);
|
|
240
|
+
}
|