semantic-atlas 2.6.1 → 2.8.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.
Files changed (47) hide show
  1. package/.agents/skills/semantic-atlas/SKILL.md +47 -22
  2. package/.agents/skills/semantic-atlas-maintenance/SKILL.md +11 -4
  3. package/.agents/skills/semantic-atlas-maintenance/references/map-authoring.md +29 -3
  4. package/README.md +26 -5
  5. package/README.zh-CN.md +23 -4
  6. package/dist/application/map-application.d.ts +2 -1
  7. package/dist/application/map-application.d.ts.map +1 -1
  8. package/dist/application/map-application.js +25 -0
  9. package/dist/application/map-application.js.map +1 -1
  10. package/dist/cli/run-cli.d.ts.map +1 -1
  11. package/dist/cli/run-cli.js +8 -0
  12. package/dist/cli/run-cli.js.map +1 -1
  13. package/dist/contracts/cli.d.ts +11 -0
  14. package/dist/contracts/cli.d.ts.map +1 -1
  15. package/dist/contracts/map.d.ts +27 -15
  16. package/dist/contracts/map.d.ts.map +1 -1
  17. package/dist/contracts/map.js +17 -5
  18. package/dist/contracts/map.js.map +1 -1
  19. package/dist/i18n/index.d.ts +4 -0
  20. package/dist/i18n/index.d.ts.map +1 -1
  21. package/dist/i18n/locales/en/cli.d.ts +2 -0
  22. package/dist/i18n/locales/en/cli.d.ts.map +1 -1
  23. package/dist/i18n/locales/en/cli.js +2 -0
  24. package/dist/i18n/locales/en/cli.js.map +1 -1
  25. package/dist/i18n/locales/zh-CN/cli.d.ts +2 -0
  26. package/dist/i18n/locales/zh-CN/cli.d.ts.map +1 -1
  27. package/dist/i18n/locales/zh-CN/cli.js +2 -0
  28. package/dist/i18n/locales/zh-CN/cli.js.map +1 -1
  29. package/dist/map/map-validator.d.ts.map +1 -1
  30. package/dist/map/map-validator.js +12 -7
  31. package/dist/map/map-validator.js.map +1 -1
  32. package/dist/query/concept-search-service.d.ts +9 -0
  33. package/dist/query/concept-search-service.d.ts.map +1 -0
  34. package/dist/query/concept-search-service.js +127 -0
  35. package/dist/query/concept-search-service.js.map +1 -0
  36. package/dist/rendering/viewer-browser.d.ts.map +1 -1
  37. package/dist/rendering/viewer-browser.js +2 -1
  38. package/dist/rendering/viewer-browser.js.map +1 -1
  39. package/dist/rendering/viewer-page.d.ts +2 -6
  40. package/dist/rendering/viewer-page.d.ts.map +1 -1
  41. package/dist/rendering/viewer-page.js.map +1 -1
  42. package/docs/architecture.md +42 -15
  43. package/docs/map-format.md +60 -18
  44. package/docs/product-contract.md +28 -13
  45. package/examples/commerce.yaml +1 -0
  46. package/package.json +4 -4
  47. package/.agents/skills/semantic-atlas/scripts/query-context.mjs +0 -101
@@ -1,15 +1,11 @@
1
- import type { BusinessFlowStepDefinition } from "../contracts/map.js";
1
+ import type { BusinessFlowStepDefinition, NavigationAnchor } from "../contracts/map.js";
2
2
  import type { DiagramLayoutSpec } from "./viewer-layout.js";
3
3
  export type ViewerMode = "export" | "web";
4
4
  export interface ViewerProjectReference {
5
5
  readonly id: string;
6
6
  readonly name: string;
7
7
  }
8
- export interface ViewerNavigationAnchor {
9
- readonly kind: string;
10
- readonly value: string;
11
- readonly description: string;
12
- }
8
+ export type ViewerNavigationAnchor = NavigationAnchor;
13
9
  export interface ViewerNodeDetails {
14
10
  readonly id: string;
15
11
  readonly kind: string;
@@ -1 +1 @@
1
- {"version":3,"file":"viewer-page.d.ts","sourceRoot":"","sources":["../../src/rendering/viewer-page.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAI5D,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,KAAK,CAAC;AAE1C,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,IAAI,EAAE,MAAM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G,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QAC5D,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;QAC1C,OAAO,EAAE,GAAG,OAAO,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,IAAI,KAAK,UAAU,GAAG,EAAE,CAAC;IACjE,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,YAAY;IACnB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAoHH,kBAAkB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgWvB,CAAC;AACJ,CAAC"}
@@ -20,7 +20,7 @@ MapDocumentLoader -> MapValidator -> BusinessFlowValidator -> BusinessGraph
20
20
  +---------------------------+-------------------+
21
21
  | |
22
22
  v v
23
- ContextQueryService MapProjector + FlowProjector
23
+ ConceptSearchService + ContextQueryService MapProjector + FlowProjector
24
24
  | |
25
25
  v v
26
26
  relationship + flow JSON shared relationship / flow Viewer
@@ -127,7 +127,19 @@ Resolves a concept by stable ID, name, or alias and returns the smallest useful
127
127
  business neighborhood: ancestors, direct children, incoming and outgoing
128
128
  relations, referenced concepts, summaries, navigation anchors, and complete
129
129
  related flows. It reports ambiguity explicitly rather than selecting a hidden
130
- match.
130
+ match. It preserves bound symbol anchors as structured file paths and
131
+ declaration names; source location and behavior confirmation belong to the
132
+ calling Agent's repository tools.
133
+
134
+ ### ConceptSearchService
135
+
136
+ Ranks every normalized business node against one natural-language query and
137
+ returns at most five deterministic candidates. It compares names, aliases,
138
+ stable IDs, and summaries through local lexical similarity, keeps scores within
139
+ `0–1`, and uses stable IDs to break ties. The score expresses relevance within
140
+ that query rather than truth or selection confidence. Candidate retrieval owns
141
+ no graph expansion or source-evidence judgment; callers pass the selected stable
142
+ ID to `ContextQueryService`.
131
143
 
132
144
  ### MapProjector
133
145
 
@@ -180,8 +192,9 @@ business meaning only. Card surfaces use a grab cursor, selected-text surfaces
180
192
  retain the text cursor, and active diagram dragging uses a grabbing cursor.
181
193
  Clicking a node or activating it with the keyboard opens its navigation anchors and
182
194
  derived related-flow links in an overlaid desktop side panel or narrow-screen
183
- bottom panel. Flow steps with a concept reference open that concept's same
184
- panel; steps without a reference remain ordinary flow content. From a boundary
195
+ bottom panel. The panel displays bound symbols as `file#value`. Flow steps with
196
+ a concept reference open that concept's same panel; steps without a reference
197
+ remain ordinary flow content. From a boundary
185
198
  concept, the complete-map view, or a concept-linked flow step, the panel can open
186
199
  the concept's owning business-domain view and select the same concept there.
187
200
  The target domain is derived from the existing non-boundary domain projection,
@@ -304,12 +317,16 @@ business-flow branches before and after the change, and continues through the
304
317
  repository's normal implementation and verification process. It classifies a
305
318
  source/flow discrepancy before proposing either a code repair or a `flow`
306
319
  maintenance candidate. Source editing and engineering judgment remain with the
307
- calling Agent.
320
+ calling Agent. For a symbol bound to a file, it locates the declaration within
321
+ that file and reads the current business behavior before expanding discovery.
322
+ Missing declarations follow its existing stale-anchor investigation route.
308
323
 
309
- The Skill invokes `context` through a small contract-checking adapter. The
310
- adapter prefers the CLI distributed with the Skill and accepts a PATH command
311
- only when it returns the current versioned envelope. This preserves one query
312
- contract when another installed product uses the same executable name.
324
+ The Skill invokes the public `semantic-atlas search` command, chooses a
325
+ candidate from its business meaning and score ordering, and then invokes the
326
+ public `semantic-atlas context` command with that candidate's stable ID. The
327
+ managed setup and upgrade lifecycle owns package and Skill version identity, so
328
+ the task workflow does not add a second command-resolution or envelope-checking
329
+ adapter.
313
330
 
314
331
  ### Maintenance Agent Skill
315
332
 
@@ -319,7 +336,10 @@ responsibilities, reuse still-correct owners, create owners for new independent
319
336
  business areas, and preserve shared identities and relation/flow ownership.
320
337
  These decisions apply equally to the first map and later maintenance. The
321
338
  [map format](map-format.md#business-ownership-and-file-boundaries) owns the
322
- common model.
339
+ common model. The Skill prefers source-file-bound methods or functions for
340
+ confirmed business actions, while retaining directory, data-file and document
341
+ anchors when those serve the concept. It refines existing navigation hints
342
+ from current evidence through the same reviewed map-editing lifecycle.
323
343
 
324
344
  Direct authoring handles requested creation, extension, correction or ownership
325
345
  reorganization from current evidence even when no retained candidates exist.
@@ -513,6 +533,7 @@ lifecycle commands:
513
533
 
514
534
  ```text
515
535
  semantic-atlas validate [--repo <path>]
536
+ semantic-atlas search <query> [--repo <path>]
516
537
  semantic-atlas context <id-or-term> [--repo <path>]
517
538
  semantic-atlas render [--repo <path>] [--output <path>]
518
539
  semantic-atlas project add [path]
@@ -537,11 +558,17 @@ browser. Observation commands report the derived repository identity, while
537
558
  package lifecycle commands remain repository-independent. Machine output uses
538
559
  a versioned envelope with a stable success or error discriminant.
539
560
 
540
- `context` returns ambiguity when multiple concepts match the term. Callers can
541
- then use a stable ID. A missing concept is a bounded map result and routes the
542
- Agent to a bounded current-evidence business model; it is not a repository
543
- failure. A successful result includes every flow related through scenario
544
- containment or direct step concept references.
561
+ `search` returns at most five ranked nodes from every business-node kind. A
562
+ successful empty result means the map has no sufficiently related vocabulary;
563
+ it is not a repository failure. Each candidate includes `rank`, a `0–1`
564
+ query-relative `score`, stable identity, node kind, supplying document, and
565
+ `matchedFields`. Exact ID, name, or alias matches score `1`; ties use stable ID.
566
+
567
+ `context` returns ambiguity when multiple concepts match a compatibility
568
+ selector. Callers can then use a stable ID. A missing concept is a bounded map
569
+ result and routes the Agent to a bounded current-evidence business model; it is
570
+ not a repository failure. A successful result includes every flow related
571
+ through scenario containment or direct step concept references.
545
572
 
546
573
  `setup`, `upgrade`, and `--version` do not discover a repository or load a
547
574
  business map. Their results expose the package version and managed Skill paths
@@ -246,14 +246,18 @@ evidence bindings.
246
246
  ```yaml
247
247
  anchors:
248
248
  - kind: file
249
- value: src/orders/place-order.service.ts
250
- description: Historical implementation entry for placing an order.
249
+ value: src/orders/order.ts
250
+ description: Order data declarations and stored states.
251
251
  - kind: directory
252
252
  value: src/inventory
253
253
  description: Inventory capability source area.
254
254
  - kind: symbol
255
+ file: src/orders/place-order.service.ts
255
256
  value: PlaceOrderService.execute
256
- description: Likely orchestration symbol.
257
+ description: Confirm inventory and create a durable customer order.
258
+ - kind: symbol
259
+ value: OrderPlaced
260
+ description: Order-created event vocabulary when its source file is unknown.
257
261
  - kind: search
258
262
  value: PLACE_ORDER
259
263
  description: Stable operation or event vocabulary.
@@ -263,12 +267,29 @@ anchors:
263
267
  ```
264
268
 
265
269
  Supported anchor kinds are `file`, `directory`, `symbol`, `search`, and
266
- `document`. `value` is repository-relative for file-like anchors and literal
267
- search vocabulary for symbol or search anchors.
268
-
269
- The CLI preserves anchors exactly in context results. It may report an advisory
270
- diagnostic for a missing file or directory. The calling agent decides how to
271
- continue through current source discovery.
270
+ `document`. Every anchor contains `kind`, `value`, and `description`. Only
271
+ `symbol` supports an optional `file`, a normalized repository-relative source
272
+ path. For a bound symbol, `value` names the declaration within that file, for
273
+ example `PlaceOrderService.execute` or the module function `placeOrder`. Include
274
+ the owning class or type when it distinguishes same-named methods. Symbol names
275
+ use the source language's vocabulary and remain language-independent hints.
276
+ An unbound symbol retains its existing literal lookup meaning. `value` remains
277
+ repository-relative for file-like anchors and literal vocabulary for `search`.
278
+
279
+ Prefer a file-bound symbol for a mapped business action when current source
280
+ establishes a decisive method or function. Its `description` explains the
281
+ specific action, rule, or state change to inspect. Domain directories, data
282
+ declaration files, product documents, and useful search terms retain their
283
+ appropriate anchor kinds. Existing anchors remain valid and can be refined
284
+ during maintenance using current evidence.
285
+
286
+ The CLI preserves the structured `file` and `value` fields in context results;
287
+ the Viewer displays a bound symbol as `file#value`. The calling agent uses its
288
+ normal repository tools to locate the current declaration and read the code,
289
+ then confirms the described business responsibility. Tracked anchors retain
290
+ names and paths while current source supplies line locations and behavior.
291
+ A missing file or declaration weakens that navigation hint and follows the
292
+ existing stale-anchor investigation path.
272
293
 
273
294
  ## Validation Rules
274
295
 
@@ -285,7 +306,8 @@ The complete repository map must satisfy:
285
306
  9. Names, summaries, IDs, aliases, anchor values, and relation summaries are
286
307
  non-empty after trimming.
287
308
  10. Aliases are unique for one node after case-insensitive normalization.
288
- 11. Repository-relative anchors remain relative and normalized.
309
+ 11. Repository-relative anchor values and symbol `file` paths remain relative
310
+ and normalized; `file` is supported only by `symbol` anchors.
289
311
  12. Normalized graph order is deterministic across file discovery order.
290
312
  13. Flow IDs are repository-wide unique and each flow belongs to an existing
291
313
  `scenario`.
@@ -307,22 +329,42 @@ The first version does not require every node to have a parent or horizontal
307
329
  relation. Incompleteness is valid advisory knowledge and remains visible to the
308
330
  caller.
309
331
 
310
- ## Lookup Semantics
332
+ ## Ranked Search And Lookup Semantics
333
+
334
+ `search <query>` compares one natural-language business query with every node,
335
+ including domains, capabilities, scenarios, operations, data, invariants, and
336
+ interfaces. It returns at most five candidates ordered by descending score and
337
+ stable ID for ties. Each candidate contains:
338
+
339
+ - `rank` within the returned list;
340
+ - a `0–1` score that compares relevance only within the current query;
341
+ - stable ID, name, kind, and supplying document ID;
342
+ - `matchedFields` drawn from `name`, `alias`, `id`, and `summary`.
343
+
344
+ The deterministic local matcher applies Unicode NFKC and lowercase
345
+ normalization, then combines character-bigram similarity with query-token
346
+ coverage. Names have full weight, followed by aliases, IDs, and summaries.
347
+ Exact ID, name, or alias matches score `1`. Candidates below the retrieval
348
+ threshold are omitted, so no sufficiently related vocabulary produces a
349
+ successful empty result rather than a concept error. Scores are ranking signals,
350
+ not correctness probabilities or map truth scores.
311
351
 
312
- A selector resolves in this order:
352
+ After choosing a candidate, callers use its stable ID with `context` to obtain
353
+ the local business neighborhood. The earlier compatibility selector remains
354
+ available and resolves in this order:
313
355
 
314
356
  1. exact stable ID;
315
357
  2. case-insensitive exact node name;
316
358
  3. case-insensitive exact alias;
317
359
  4. normalized partial name or alias match.
318
360
 
319
- One match returns a context projection. Multiple matches return ambiguity with
320
- stable IDs and names. Zero matches returns `CONCEPT_NOT_FOUND` and leaves
321
- bounded current-evidence business discovery available.
361
+ One compatibility match returns a context projection. Multiple matches return
362
+ ambiguity with stable IDs and names. Zero matches returns `CONCEPT_NOT_FOUND`
363
+ and leaves bounded current-evidence business discovery available.
322
364
 
323
- The initial lookup is deterministic and vocabulary-based. Natural-language
324
- inference belongs to the calling agent, which can issue another bounded term or
325
- continue with current source.
365
+ Both paths are deterministic and vocabulary-based. The calling agent owns the
366
+ business choice among ranked candidates and continues with current evidence
367
+ when no candidate is sufficient.
326
368
 
327
369
  ## Context Projection
328
370
 
@@ -48,10 +48,20 @@ uses current evidence and is held to a higher accuracy standard than the map.
48
48
 
49
49
  ### Coding agent orientation
50
50
 
51
- An agent receives a feature, bug, refactor, or impact question. It queries a
52
- compact business neighborhood even when no map documents exist. It follows map
53
- leads when available, otherwise establishes the smallest source-supported
54
- business boundary, then opens decisive current evidence before editing.
51
+ An agent receives a feature, bug, refactor, or impact question. It first ranks
52
+ mapped concepts from the task's natural business language, selects a stable ID,
53
+ and then queries that concept's compact business neighborhood. This probe still
54
+ runs when no map documents exist. The agent follows map leads when available,
55
+ otherwise establishes the smallest source-supported business boundary, then
56
+ opens decisive current evidence before editing.
57
+
58
+ For a mapped business action, a source-file-bound symbol can point to the
59
+ specific method or function that carries it. The Agent locates that declaration
60
+ inside the named file using its normal repository tools and confirms the
61
+ described business responsibility in current code. Existing file, directory,
62
+ document, search, and unbound symbol hints remain valid. The
63
+ [navigation-anchor contract](map-format.md#navigation-anchors) defines the shape
64
+ and when each granularity is useful.
55
65
 
56
66
  ### Root-cause and impact discovery
57
67
 
@@ -229,17 +239,21 @@ The initial product delivers one coherent path:
229
239
  1. Load tracked map documents from a repository.
230
240
  2. Validate document shape and graph integrity.
231
241
  3. Normalize the complete map in memory.
232
- 4. Find a business concept by stable ID, name, or alias.
233
- 5. Return its containment, direct business relations, related concepts, and
242
+ 4. Rank up to five concepts of any node kind for a natural-language business
243
+ query, with a deterministic query-relative score and stable IDs.
244
+ 5. Select a concept by stable ID, while retaining the existing exact and partial
245
+ selector behavior for compatibility.
246
+ 6. Return its containment, direct business relations, related concepts, and
234
247
  navigation anchors as structured JSON, together with complete related
235
248
  business flows.
236
- 6. Render deterministic interactive human-readable projections from the same
249
+ 7. Render deterministic interactive human-readable projections from the same
237
250
  graph as a portable HTML artifact or loopback Web session, with linked
238
251
  relationship and flow views.
239
- 7. Package an Agent Skill that activates from business task meaning, routes map
240
- context or `MAP_NOT_FOUND` into current-source confirmation, and makes an
241
- explicit post-task maintenance decision.
242
- 8. Exercise the workflow against real engineering tasks, including stale and
252
+ 8. Package an Agent Skill that activates from business task meaning, runs the
253
+ ranked-search and stable-ID context sequence, routes map context or
254
+ `MAP_NOT_FOUND` into current-source confirmation, and makes an explicit
255
+ post-task maintenance decision.
256
+ 9. Exercise the workflow against real engineering tasks, including stale and
243
257
  incomplete map cases.
244
258
 
245
259
  Map loading, validation, querying, and rendering remain stateless between
@@ -278,8 +292,9 @@ the following:
278
292
 
279
293
  - tracked example and real-project map files load and validate through the
280
294
  public CLI;
281
- - context queries return the expected business owner, containment, incoming and
282
- outgoing relationships, navigation anchors, and related flows;
295
+ - ranked search returns the expected node-level candidates and stable IDs, then
296
+ context queries return the expected business owner, containment, incoming
297
+ and outgoing relationships, navigation anchors, and related flows;
283
298
  - the renderer produces readable relationship and flow projections from the
284
299
  same normalized map and links shared business concepts between them;
285
300
  - a package-managed Agent Skill activates for business-changing work with or
@@ -52,6 +52,7 @@ nodes:
52
52
  - Checkout
53
53
  anchors:
54
54
  - kind: symbol
55
+ file: src/orders/place-order.service.ts
55
56
  value: PlaceOrderService.execute
56
57
  description: Historical orchestration entry point to confirm in current source.
57
58
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "semantic-atlas",
3
- "version": "2.6.1",
3
+ "version": "2.8.0",
4
4
  "description": "A Git-native advisory business map for coding agents.",
5
5
  "keywords": [
6
6
  "ai-agents",
@@ -81,9 +81,9 @@
81
81
  "test:built": "pnpm build && node tests/smoke/built-render.mjs && node tests/smoke/built-skill.mjs",
82
82
  "test:package": "node tests/smoke/packaged-product.mjs",
83
83
  "typecheck": "tsc -p tsconfig.json",
84
- "lint": "oxlint --deny-warnings src tests scripts .agents/skills/semantic-atlas/scripts vitest.config.ts",
84
+ "lint": "oxlint --deny-warnings src tests scripts vitest.config.ts",
85
85
  "lint:fix": "pnpm lint --fix",
86
- "format": "oxfmt --write \"src/**/*.ts\" \"tests/**/*.{ts,mjs}\" \"scripts/**/*.mjs\" \".agents/skills/*/scripts/*.mjs\" vitest.config.ts",
87
- "format:check": "oxfmt --check \"src/**/*.ts\" \"tests/**/*.{ts,mjs}\" \"scripts/**/*.mjs\" \".agents/skills/*/scripts/*.mjs\" vitest.config.ts"
86
+ "format": "oxfmt --write \"src/**/*.ts\" \"tests/**/*.{ts,mjs}\" \"scripts/**/*.mjs\" vitest.config.ts",
87
+ "format:check": "oxfmt --check \"src/**/*.ts\" \"tests/**/*.{ts,mjs}\" \"scripts/**/*.mjs\" vitest.config.ts"
88
88
  }
89
89
  }
@@ -1,101 +0,0 @@
1
- import { access, readFile } from "node:fs/promises";
2
- import { fileURLToPath } from "node:url";
3
- import { spawnSync } from "node:child_process";
4
-
5
- const arguments_ = process.argv.slice(2);
6
- if (arguments_.length === 0) {
7
- fail("Usage: query-context.mjs <business-term> --repo <repository-root>");
8
- }
9
-
10
- const bundledCli = fileURLToPath(new URL("../../../../dist/cli/bin.js", import.meta.url));
11
- const command = await resolveCliCommand();
12
- const result = spawnSync(command.executable, command.arguments, {
13
- encoding: "utf8",
14
- });
15
-
16
- if (result.error) {
17
- fail(`Could not run the semantic-atlas CLI: ${result.error.message}`);
18
- }
19
-
20
- let envelope;
21
- try {
22
- envelope = JSON.parse(result.stdout);
23
- } catch {
24
- fail("The available semantic-atlas command does not implement the v1 context contract.");
25
- }
26
-
27
- if (envelope?.schemaVersion !== 1 || envelope?.command !== "context") {
28
- fail("The available semantic-atlas command returned an incompatible context envelope.");
29
- }
30
-
31
- process.stdout.write(result.stdout);
32
- process.stderr.write(result.stderr);
33
- process.exitCode = result.status ?? 2;
34
-
35
- async function resolveCliCommand() {
36
- const managedIdentity = await readManagedIdentity();
37
- if (managedIdentity) {
38
- const versionResult = spawnSync("semantic-atlas", ["--version"], {
39
- encoding: "utf8",
40
- });
41
- if (versionResult.error) {
42
- fail(`Could not verify the managed semantic-atlas CLI: ${versionResult.error.message}`);
43
- }
44
- const installedVersion = versionResult.stdout.trim();
45
- if (versionResult.status !== 0 || installedVersion !== managedIdentity.packageVersion) {
46
- fail(
47
- `The managed Semantic Atlas Skill requires CLI ${managedIdentity.packageVersion}, but ${installedVersion || "no compatible CLI"} is available.`,
48
- );
49
- }
50
- return {
51
- executable: "semantic-atlas",
52
- arguments: ["context", ...arguments_],
53
- };
54
- }
55
-
56
- if (await fileExists(bundledCli)) {
57
- return {
58
- executable: process.execPath,
59
- arguments: [bundledCli, "context", ...arguments_],
60
- };
61
- }
62
-
63
- return {
64
- executable: "semantic-atlas",
65
- arguments: ["context", ...arguments_],
66
- };
67
- }
68
-
69
- async function readManagedIdentity() {
70
- try {
71
- const marker = JSON.parse(
72
- await readFile(new URL("../.semantic-atlas-managed.json", import.meta.url), "utf8"),
73
- );
74
- if (
75
- marker?.schemaVersion === 1 &&
76
- marker?.managedBy === "semantic-atlas" &&
77
- marker?.skillName === "semantic-atlas" &&
78
- typeof marker?.packageVersion === "string"
79
- ) {
80
- return { packageVersion: marker.packageVersion };
81
- }
82
- fail("The managed Semantic Atlas Skill has an invalid package identity.");
83
- } catch (error) {
84
- if (error?.code === "ENOENT") return undefined;
85
- fail("The managed Semantic Atlas Skill package identity could not be read.");
86
- }
87
- }
88
-
89
- async function fileExists(filePath) {
90
- try {
91
- await access(filePath);
92
- return true;
93
- } catch {
94
- return false;
95
- }
96
- }
97
-
98
- function fail(message) {
99
- process.stderr.write(`${message}\n`);
100
- process.exit(2);
101
- }