apcore-toolkit 0.10.1 → 0.11.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.
@@ -0,0 +1,319 @@
1
+ /**
2
+ * TuiViewModel — Tier-1 byte-equivalent module-list view shape.
3
+ *
4
+ * Lifts the *shape* of a module-list view (columns, rows, filter intent,
5
+ * sort intent, color-by-tag rules) into the toolkit, so every downstream
6
+ * consumer (`apcore-cli-*`, future browser dashboards, MCP/A2A surfaces)
7
+ * produces identical column sets, identical filter semantics, and identical
8
+ * row order for the same `ScannedModule` input. Rendering itself stays
9
+ * Tier 2 and is free to differ in pixels.
10
+ *
11
+ * Pure, synchronous, no Node.js dependency — also re-exported from
12
+ * `apcore-toolkit/browser`.
13
+ *
14
+ * See `apcore-toolkit/docs/features/tui-view-model.md` for the full V1
15
+ * specification, wire format, and conformance corpus.
16
+ */
17
+ const SORTABLE_KEYS = new Set(['module_id', 'alias', 'description']);
18
+ // No built-in default column set: `columns` must be explicitly requested by
19
+ // the caller. An empty `columns` array yields an empty `columns` array (see
20
+ // conformance fixture `view_model_001_empty_list`) — callers wanting the
21
+ // conventional ID/description/tags layout pass it explicitly, e.g.
22
+ // `columns: ["module_id", "description", "tags"]`.
23
+ const COLUMN_LABELS = {
24
+ module_id: 'ID',
25
+ alias: 'Alias',
26
+ description: 'Description',
27
+ tags: 'Tags',
28
+ };
29
+ // `Filter.annotations` names are the spec's snake_case `ModuleAnnotations`
30
+ // flag names (matching Python's `getattr`/Rust's explicit match, both
31
+ // snake_case), but the installed `apcore-js` package's `ModuleAnnotations`
32
+ // interface uses camelCase field names. Multi-word flags need translation
33
+ // or the lookup silently misses (a bare `annotationsRecord[snakeCaseName]`
34
+ // is always `undefined` for `requires_approval`/`open_world`, excluding
35
+ // every module regardless of the flag's real value). Single-word flags are
36
+ // identical either way and don't need an entry.
37
+ const ANNOTATION_FIELD_ALIASES = {
38
+ requires_approval: 'requiresApproval',
39
+ open_world: 'openWorld',
40
+ };
41
+ // `Filter.annotations` recognizes exactly the 9 canonical boolean
42
+ // `ModuleAnnotations` flags (matching Rust's hardcoded 9-way match and
43
+ // Python's explicit frozenset) — never the non-boolean `cacheTtl` /
44
+ // `cacheKeyFields` / `paginationStyle` / `extra` fields. Those would
45
+ // otherwise either silently miss (multi-word names not in the alias map
46
+ // above, evaluated against the wrong un-aliased key) or, worse, accidentally
47
+ // "work" via a truthy-object check (`extra` is a dict, always present and
48
+ // therefore always truthy) that never reflects the caller's intent. An
49
+ // unrecognized name excludes every module, exactly as if the flag were
50
+ // `false`.
51
+ const FILTERABLE_ANNOTATION_FLAGS = new Set([
52
+ 'readonly',
53
+ 'destructive',
54
+ 'idempotent',
55
+ 'requires_approval',
56
+ 'open_world',
57
+ 'streaming',
58
+ 'cacheable',
59
+ 'paginated',
60
+ 'discoverable',
61
+ ]);
62
+ function cellToWire(cell) {
63
+ const d = { kind: cell.kind };
64
+ if (cell.kind === 'tags') {
65
+ d['values'] = cell.values ? [...cell.values] : [];
66
+ }
67
+ else {
68
+ d['value'] = cell.value ?? '';
69
+ }
70
+ // `tone` is only a defined field for "text"/"badge"/"symbol" cells per the
71
+ // wire-format spec's Cell schema table — "tags" has no `tone` entry there,
72
+ // and Rust's Cell::Tags variant has no tone field at all (structurally
73
+ // cannot carry one). Suppress it here too so a hand-built toned "tags"
74
+ // cell doesn't silently diverge from what Rust can even represent.
75
+ if (cell.tone != null && cell.kind !== 'tags') {
76
+ d['tone'] = cell.tone;
77
+ }
78
+ return d;
79
+ }
80
+ function columnToWire(column) {
81
+ const d = { key: column.key, label: column.label };
82
+ if (column.justify != null && column.justify !== 'left') {
83
+ d['justify'] = column.justify;
84
+ }
85
+ if (column.toneBy != null) {
86
+ d['tone_by'] = column.toneBy;
87
+ }
88
+ return d;
89
+ }
90
+ function rowToWire(row) {
91
+ const d = { cells: row.cells.map(cellToWire) };
92
+ if (row.tags && row.tags.length > 0) {
93
+ d['tags'] = [...row.tags];
94
+ }
95
+ return d;
96
+ }
97
+ function sortToWire(sort) {
98
+ return { key: sort.key, direction: sort.direction ?? 'asc' };
99
+ }
100
+ function filterToWire(filter) {
101
+ return {
102
+ tags: [...filter.tags],
103
+ search: filter.search,
104
+ annotations: [...filter.annotations],
105
+ exposure: filter.exposure,
106
+ deprecated: filter.deprecated,
107
+ };
108
+ }
109
+ function toneRuleToWire(rule) {
110
+ return { match: { kind: rule.kind ?? 'tag_equals', value: rule.value }, tone: rule.tone };
111
+ }
112
+ function tonePaletteToWire(palette) {
113
+ return { name: palette.name, rules: palette.rules.map(toneRuleToWire) };
114
+ }
115
+ function groupToWire(group) {
116
+ return { label: group.label, row_indices: [...group.rowIndices] };
117
+ }
118
+ function toWireObject(vm) {
119
+ const d = {
120
+ schema_version: vm.schemaVersion ?? 1,
121
+ kind: vm.kind,
122
+ };
123
+ if (vm.title != null) {
124
+ d['title'] = vm.title;
125
+ }
126
+ d['columns'] = vm.columns.map(columnToWire);
127
+ d['rows'] = vm.rows.map(rowToWire);
128
+ if (vm.groups != null) {
129
+ d['groups'] = vm.groups.map(groupToWire);
130
+ }
131
+ if (vm.sort != null) {
132
+ d['sort'] = sortToWire(vm.sort);
133
+ }
134
+ if (vm.filter != null) {
135
+ d['filter'] = filterToWire(vm.filter);
136
+ }
137
+ if (vm.tonePalettes != null && vm.tonePalettes.length > 0) {
138
+ d['tone_palettes'] = vm.tonePalettes.map(tonePaletteToWire);
139
+ }
140
+ return d;
141
+ }
142
+ /**
143
+ * Canonical, byte-identical compact JSON encoding of `vm`.
144
+ *
145
+ * See `apcore-toolkit/docs/features/tui-view-model.md` § Canonical JSON
146
+ * Encoding: declaration-order keys, optional fields omitted (never
147
+ * `null`), lowercase booleans, no floating point, no whitespace.
148
+ */
149
+ export function formatViewModel(vm) {
150
+ return JSON.stringify(toWireObject(vm));
151
+ }
152
+ function resolveAlias(module, useDisplay) {
153
+ if (useDisplay && module.display) {
154
+ const alias = module.display['alias'];
155
+ if (alias)
156
+ return String(alias);
157
+ }
158
+ return module.moduleId;
159
+ }
160
+ function resolveDescription(module, useDisplay) {
161
+ if (useDisplay && module.display) {
162
+ const description = module.display['description'];
163
+ if (description)
164
+ return String(description);
165
+ }
166
+ return module.description || '';
167
+ }
168
+ function cellFor(columnKey, module, useDisplay) {
169
+ if (columnKey === 'module_id')
170
+ return { kind: 'text', value: module.moduleId };
171
+ if (columnKey === 'alias')
172
+ return { kind: 'text', value: resolveAlias(module, useDisplay) };
173
+ if (columnKey === 'description')
174
+ return { kind: 'text', value: resolveDescription(module, useDisplay) };
175
+ if (columnKey === 'tags')
176
+ return { kind: 'tags', values: [...module.tags] };
177
+ // Unknown/custom column key: fall back to an empty text cell rather than
178
+ // throwing, so a caller-declared column with no toolkit-known source
179
+ // still yields a well-formed row (renderers may post-process).
180
+ return { kind: 'text', value: '' };
181
+ }
182
+ function passesFilter(module, flt, description) {
183
+ if (flt === null)
184
+ return true;
185
+ const moduleTags = new Set(module.tags);
186
+ if (flt.tags.length > 0 && !flt.tags.every((t) => moduleTags.has(t)))
187
+ return false;
188
+ if (flt.search) {
189
+ const haystack = `${module.moduleId} ${description}`.toLowerCase();
190
+ if (!haystack.includes(flt.search.toLowerCase()))
191
+ return false;
192
+ }
193
+ const annotations = module.annotations;
194
+ const annotationsRecord = annotations;
195
+ for (const annotationName of flt.annotations) {
196
+ if (!FILTERABLE_ANNOTATION_FLAGS.has(annotationName))
197
+ return false;
198
+ const fieldName = ANNOTATION_FIELD_ALIASES[annotationName] ?? annotationName;
199
+ if (!annotationsRecord || !annotationsRecord[fieldName])
200
+ return false;
201
+ }
202
+ // `discoverable` (ModuleAnnotations, default true) is the shipped signal
203
+ // for "appears in enumeration surfaces" — hidden means not discoverable.
204
+ const isHidden = !(annotations?.discoverable ?? true);
205
+ if (flt.exposure === 'exposed' && isHidden)
206
+ return false;
207
+ if (flt.exposure === 'hidden' && !isHidden)
208
+ return false;
209
+ // ModuleAnnotations has no first-class `deprecated` field; the toolkit
210
+ // convention (matching OpenAPIScanner) is `annotations.extra.deprecated`.
211
+ const extra = (annotations?.extra ?? {});
212
+ const isDeprecated = Boolean(extra['deprecated']);
213
+ if (!flt.deprecated && isDeprecated)
214
+ return false;
215
+ return true;
216
+ }
217
+ function sortKeyFor(columnKey, module, alias, description) {
218
+ if (columnKey === 'alias')
219
+ return alias;
220
+ if (columnKey === 'description')
221
+ return description;
222
+ return module.moduleId;
223
+ }
224
+ function buildGroups(resolved, groupBy) {
225
+ const buckets = new Map();
226
+ const order = [];
227
+ resolved.forEach(({ module }, idx) => {
228
+ let labels;
229
+ if (groupBy === 'tag') {
230
+ labels = module.tags.length > 0 ? [...module.tags] : ['(untagged)'];
231
+ }
232
+ else if (groupBy === 'prefix') {
233
+ labels = [module.moduleId.split('.', 1)[0]];
234
+ }
235
+ else {
236
+ labels = ['(all)'];
237
+ }
238
+ for (const label of labels) {
239
+ if (!buckets.has(label)) {
240
+ buckets.set(label, []);
241
+ order.push(label);
242
+ }
243
+ buckets.get(label).push(idx);
244
+ }
245
+ });
246
+ return order.map((label) => ({ label, rowIndices: buckets.get(label) }));
247
+ }
248
+ /**
249
+ * Build a byte-equivalent {@link TuiViewModel} from scanned modules.
250
+ *
251
+ * See `Contract: modules_to_view_model` and the wire-format schema in
252
+ * `apcore-toolkit/docs/features/tui-view-model.md`.
253
+ *
254
+ * Sort/filter execution model: filtering by `tags` / `search` /
255
+ * `annotations` / `exposure` / `deprecated` always executes here. Sorting
256
+ * by `module_id` / `alias` / `description` executes here; any other
257
+ * `sort.key` (e.g. usage-based `calls` / `errors` / `latency`) is honoured
258
+ * verbatim in the incoming `modules` order — the caller is responsible for
259
+ * pre-sorting those.
260
+ */
261
+ export function modulesToViewModel(modules, options = {}) {
262
+ const { view = 'list', columns = [], title, filter = null, sort = null, groupBy = null, tonePalettes = [], display = true, } = options;
263
+ // V1 convention: with no explicit per-column wiring in the public API,
264
+ // the first supplied palette (if any) is referenced by the "tags"
265
+ // column's `toneBy` — the only column shape a `tag_equals` rule can
266
+ // meaningfully colour. Per-value tone resolution (which tag chip gets
267
+ // which colour) is a Tier-2 renderer concern, not computed here.
268
+ const tagsPalette = tonePalettes.length > 0 ? tonePalettes[0] : null;
269
+ const columnObjs = columns.map((key) => ({
270
+ key,
271
+ label: COLUMN_LABELS[key] ?? key,
272
+ toneBy: tagsPalette !== null && key === 'tags' ? tagsPalette.name : null,
273
+ }));
274
+ const resolved = [];
275
+ for (const module of modules) {
276
+ const alias = resolveAlias(module, display);
277
+ const description = resolveDescription(module, display);
278
+ if (!passesFilter(module, filter, description))
279
+ continue;
280
+ resolved.push({ module, alias, description });
281
+ }
282
+ if (sort !== null && SORTABLE_KEYS.has(sort.key)) {
283
+ const reverse = sort.direction === 'desc';
284
+ // Array#sort is a stable sort (guaranteed since ES2019 / Node 12+):
285
+ // entries with equal keys retain their original relative order
286
+ // regardless of `reverse`, matching Python's `list.sort(reverse=...)`.
287
+ resolved.sort((a, b) => {
288
+ const ka = sortKeyFor(sort.key, a.module, a.alias, a.description);
289
+ const kb = sortKeyFor(sort.key, b.module, b.alias, b.description);
290
+ const cmp = ka < kb ? -1 : ka > kb ? 1 : 0;
291
+ return reverse ? -cmp : cmp;
292
+ });
293
+ }
294
+ const rows = resolved.map(({ module, alias, description }) => {
295
+ const cells = columnObjs.map((column) => {
296
+ if (column.key === 'alias')
297
+ return { kind: 'text', value: alias };
298
+ if (column.key === 'description')
299
+ return { kind: 'text', value: description };
300
+ return cellFor(column.key, module, display);
301
+ });
302
+ return { cells, tags: [...module.tags] };
303
+ });
304
+ let groups = null;
305
+ if (view === 'grouped') {
306
+ groups = buildGroups(resolved, groupBy);
307
+ }
308
+ return {
309
+ kind: view,
310
+ title: title ?? null,
311
+ columns: columnObjs,
312
+ rows,
313
+ groups,
314
+ sort,
315
+ filter,
316
+ tonePalettes: tonePalettes.length > 0 ? tonePalettes : null,
317
+ };
318
+ }
319
+ //# sourceMappingURL=tui-view-model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tui-view-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E,EAAE,EAAE;QAClE,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,MAAM,EAAQ,EAAE;YAC5C,IAAI,MAAM,CAAC,GAAG,KAAK,OAAO;gBAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;YAClE,IAAI,MAAM,CAAC,GAAG,KAAK,aAAa;gBAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC;YAC9E,OAAO,OAAO,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;QAC9C,CAAC,CAAC,CAAC;QACH,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC;IAC3C,CAAC,CAAC,CAAC;IAEH,IAAI,MAAM,GAAmB,IAAI,CAAC;IAClC,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;QACvB,MAAM,GAAG,WAAW,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC1C,CAAC;IAED,OAAO;QACL,IAAI,EAAE,IAAI;QACV,KAAK,EAAE,KAAK,IAAI,IAAI;QACpB,OAAO,EAAE,UAAU;QACnB,IAAI;QACJ,MAAM;QACN,IAAI;QACJ,MAAM;QACN,YAAY,EAAE,YAAY,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI;KAC5D,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apcore-toolkit",
3
- "version": "0.10.1",
3
+ "version": "0.11.0",
4
4
  "description": "Shared scanner, schema extraction, and output toolkit for apcore framework adapters",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -55,7 +55,7 @@
55
55
  },
56
56
  "dependencies": {
57
57
  "ajv": "^8.17.0",
58
- "apcore-js": ">=0.26.0",
58
+ "apcore-js": ">=0.29.0",
59
59
  "js-yaml": "^4.1.0"
60
60
  },
61
61
  "peerDependencies": {