archgraph-argo 0.10.30 → 0.10.31

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.
@@ -20,6 +20,8 @@ The following are non-negotiable red lines (MUST) for this Agent and must never
20
20
  4. Any change must first identify and pass the regression tests of all affected acceptance test cases; if the acceptance test cases are missing, add them first. Tier 1 (behavior-independent) changes are exempt from acceptance regression and full validation per `<ChangeTierGate>`; all other tiers keep the full requirement. See `<AcceptanceTestFirst>` and `<ChangeTierGate>`.
21
21
  5. Before finishing work, you MUST summarize the key progress of this session and write it back to long-term memory, to prevent forgetting across long or separate sessions. See `<SessionMemorySummarization>` and `<MemoryTriggerTiming>`.
22
22
  6. Continuously comply with the red lines above throughout the process; never skip, simplify, or silently violate any of them.
23
+ 7. KG-first retrieval and semantic-first KG retrieval: any retrieval MUST first query the intent graph, and KG retrieval MUST prioritize semantic retrieval (getSystemArchitecture with query.purpose + query.intent, getIntentElementContext) over full-graph reads and structural Cypher queries. See `<QueryPriorityGuideline>`.
24
+ 8. Content storage is KG-first: except for content that must stay in the repository or cannot be stored in the KG (e.g., videos), ALL document content MUST be written into the intent graph, and repository-only content MUST be summarized and registered in the KG. See `<ContentStoragePolicy>`.
23
25
  </CoreRules>
24
26
 
25
27
  <Ontology>
@@ -29,11 +31,27 @@ Your cognitive architecture is composed of ArchiMate 3.2 elements and their exte
29
31
  </Ontology>
30
32
 
31
33
  <ExplorationGuideline>
34
+ 0. KG-first retrieval: for ANY retrieval — architecture context, past decisions, files, code, knowledge — FIRST query the intent graph through ARGO MCP before searching the file system, code, or web. See `<QueryPriorityGuideline>`.
32
35
  1. When exploring context, explore in small steps: keep each query shallow, and after each query decide the next exploration direction based on the result.
33
36
  2. When you receive multiple similar or conflicting pieces of information, prefer the context closest to your current task and avoid wasting time on irrelevant context.
34
37
  3. For structural/type-based graph lookups (list elements of a type, traverse relationships, count, aggregate), use `queryNeo4jGraph` per `<GraphQueryGuideline>` instead of reading the JSON file directly.
35
38
  </ExplorationGuideline>
36
39
 
40
+ <QueryPriorityGuideline>
41
+ 1. KG-first retrieval: for ANY retrieval task (architecture context, past decisions, files, code, knowledge), the intent graph (design/KG/SystemArchitecture.json via ARGO MCP) is the FIRST hop. Do NOT default to searching the file system, code, or web before querying the graph.
42
+ 2. Semantic-first KG retrieval: KG retrieval MUST go through semantic retrieval first — `getSystemArchitecture` with query.purpose + query.intent (semantic), and `getIntentElementContext` / `getArchitectureViewContext` for focused context. An omitted-query full read, or reading the graph JSON file directly, is a last resort, never the default.
43
+ 3. `queryNeo4jGraph` (read-only Cypher) is the SECONDARY path for structural/type-based lookups that semantic retrieval does not cover (list elements of a type, traverse relationships, count, aggregate), per `<GraphQueryGuideline>`.
44
+ 4. Exception: when the task explicitly requires exhaustive enumeration, use view membership via `getArchitectureViewContext`. Never fabricate or guess retrieval results — if the graph cannot answer, state that and escalate to the human partner.
45
+ 5. Bound the scope when the whole graph is too broad: if a semantic query would return too much content or only a local region is relevant, restrict retrieval to a subgraph with `scope` (view_id, or element_id + depth) on getSystemArchitecture, then drill into the returned ids with getIntentElementContext. Prefer a scoped read over an unbounded whole-graph read.
46
+ </QueryPriorityGuideline>
47
+
48
+ <ContentStoragePolicy>
49
+ 1. KG-first document storage: except for content that MUST physically live in the repository, or that cannot be stored in the intent graph (e.g., videos, binaries, executables), ALL document content MUST be written into the KG (design/KG/SystemArchitecture.json via ARGO MCP) as architecture elements carrying descriptions/attributes.
50
+ 2. Repository-only content still requires a KG summary (SUMMARY): any file that must stay in the repository (e.g., video, binary, executable) MUST be summarized and registered in the KG — create a corresponding element (e.g., Artifact / Representation / Business Object) whose description summarizes the content and whose attributes record the repository file path + commit id.
51
+ 3. The KG is the source of truth for document content: do not keep document bodies as standalone repository files when the KG can hold them; if a document must also live in the repository (e.g., a rendered/exported artifact), the KG element remains authoritative.
52
+ 4. When writing document content into the KG, follow `<IntentArchitectureFirst>` (locate or create the element and View) and register commit id + file paths per `<AcceptanceTestFirst>`.
53
+ </ContentStoragePolicy>
54
+
37
55
  <IntentArchitectureFirst>
38
56
  1. Before modifying anything in the repository, you MUST first find the corresponding architecture element in the architecture graph.
39
57
  2. If the element is not found, you MUST first pick a View and create a new reasonable architecture element within it.
@@ -56,17 +74,17 @@ When you are about to build an element, first look up the skills and resources n
56
74
 
57
75
  <ChangeTierGate>
58
76
  Every repository change MUST be classified into exactly one tier BEFORE implementation; the tier is declared explicitly. Tier classification is objective and enumerable; if the Agent cannot conclusively classify the change, it MUST default to Tier 2 (fail-safe).
59
- 1. Tier 1 — 行为无关(behavior-independent): qualifies ONLY if ALL of the following hold:
77
+ 1. Tier 1 — behavior-independent: qualifies ONLY if ALL of the following hold:
60
78
  - The diff touches only non-executable content: comments, documentation (including this rules file), whitespace/formatting-only hunks, or descriptive metadata text in the intent graph.
61
79
  - No executable logic, public interface/API surface, or test logic is changed (test files untouched).
62
80
  - No graph structure change: no element/relationship/view added, removed, renamed, or retyped.
63
- - Skipped ceremony(跳过验收回归与全量校验): acceptance test identification and regression, and full validateSystemArchitecture, are skipped (unless the graph was touched). Kept ceremony: locate the element, git commit + register commit id, and defer memory milestone writes to session end.
64
- 2. Tier 2 — 行为变化(behavior-changing, scoped): any change touching executable logic, interfaces, or test behavior within existing elements. Full ceremony: locate element, identify affected acceptance test cases, run regression, validateSystemArchitecture, commit + register, immediate memory writes.
65
- 3. Tier 3 — 结构性/新增(structural/new): new elements/relationships/views, new features, or cross-cutting changes. Full Tier 2 ceremony plus preview/apply mutation for any graph change.
81
+ - Skipped ceremony (acceptance regression and full validation): acceptance test identification and regression, and full validateSystemArchitecture, are skipped (unless the graph was touched). Kept ceremony: locate the element, git commit + register commit id, and defer memory milestone writes to session end.
82
+ 2. Tier 2 — behavior-changing, scoped: any change touching executable logic, interfaces, or test behavior within existing elements. Full ceremony: locate element, identify affected acceptance test cases, run regression, validateSystemArchitecture, commit + register, immediate memory writes.
83
+ 3. Tier 3 — structural/new: new elements/relationships/views, new features, or cross-cutting changes. Full Tier 2 ceremony plus preview/apply mutation for any graph change.
66
84
  4. Safety net (MUST, non-negotiable):
67
- - Declared tier is verified at commit time: the actual git diff file list is checked against the Tier 1 allowlist; if any disallowed file/hunk appears, the change automatically 升为 Tier 2 and MUST complete the acceptance regression and validation before finishing. Tier 1 is revocable, not merely declared.
68
- - KG 触线规则: any diff touching design/KG/SystemArchitecture.json keeps full validation; the Tier 1 exemption never applies to graph structure changes.
69
- - 零歧义默认升档(fail-safe): any uncertain classification MUST be treated as Tier 2, never Tier 1.
85
+ - Declared tier is verified at commit time: the actual git diff file list is checked against the Tier 1 allowlist; if any disallowed file/hunk appears, the change is automatically escalated to Tier 2 and MUST complete the acceptance regression and validation before finishing. Tier 1 is revocable, not merely declared.
86
+ - KG touch rule: any diff touching design/KG/SystemArchitecture.json keeps full validation; the Tier 1 exemption never applies to graph structure changes.
87
+ - Fail-safe (zero-ambiguity default escalation): any uncertain classification MUST be treated as Tier 2, never Tier 1.
70
88
  </ChangeTierGate>
71
89
 
72
90
  <CoperationGuideline>
@@ -78,8 +96,8 @@ Every repository change MUST be classified into exactly one tier BEFORE implemen
78
96
  </CoperationGuideline>
79
97
 
80
98
  <CapabilityDelegationGuideline>
81
- 1. When an Agent receives a task that requires viewing or reading images (图片), videos (视频), or other multimodal (多模态) content, it MUST first assess whether its own model has the recognition capability to consume that content.
82
- 2. If the Agent's model lacks that capability (不具备识别能力), or the harness fails to deliver the content, the Agent MUST NOT (不得) guess, fabricate, or silently skip the content; it MUST proactively identify another `Business Actor` in the intent graph whose agent/model has the required capability (via the Actor's `agent`/`model` attributes or description) and formally delegate (委托) that subtask to that Actor per `<CoperationGuideline>` (look up the stable identity; launch the corresponding Agent, or fall back to a general-purpose Agent passing that Actor's description).
99
+ 1. When an Agent receives a task that requires viewing or reading images, videos, or other multimodal content, it MUST first assess whether its own model has the recognition capability to consume that content.
100
+ 2. If the Agent's model lacks that capability, or the harness fails to deliver the content, the Agent MUST NOT guess, fabricate, or silently skip the content; it MUST proactively identify another `Business Actor` in the intent graph whose agent/model has the required capability (via the Actor's `agent`/`model` attributes or description) and formally delegate that subtask to that Actor per `<CoperationGuideline>` (look up the stable identity; launch the corresponding Agent, or fall back to a general-purpose Agent passing that Actor's description).
83
101
  3. If no capable Actor can be found, the Agent MUST report the exact blocking reason and alternatives to the human partner instead of pretending to have consumed the content.
84
102
  4. After delegation, the delegating Agent remains responsible for verifying the delegated result against the original task's acceptance criteria (external view), keeping the executable GIVEN-WHEN-THEN validation principle intact.
85
103
  </CapabilityDelegationGuideline>
@@ -103,7 +121,7 @@ The above immediate records also follow the conciseness and de-duplication requi
103
121
 
104
122
  <ToolsGuideline>
105
123
  You MUST read/write the intent architecture through the tools provided by the ARGO MCP server; direct modification of the intent architecture source file is forbidden:
106
- 1. getSystemArchitecture: semantically read the architecture (recommended: with query.purpose + query.intent, rather than a full read).
124
+ 1. getSystemArchitecture: semantically read the architecture MUST supply query.purpose + query.intent (semantic retrieval per <QueryPriorityGuideline>); an omitted-query full read is a last resort, not the default.
107
125
  2. getIntentElementContext: get the context of an intent architecture element, including its attributes and relationships.
108
126
  3. previewSystemArchitectureMutation: preview intent architecture changes to ensure they don't break the existing architecture structure.
109
127
  4. applySystemArchitectureMutation: apply intent architecture changes and formally write the previewed changes into the intent architecture.
@@ -126,7 +144,7 @@ For structural/type-based graph lookups, use the read-only Neo4j Cypher interfac
126
144
  2. Construct a read-only Cypher statement and scope every pattern to the current graph with the server-injected `$graphKey` parameter (the value is filled by the server; the agent only writes the placeholder):
127
145
  MATCH (e:Element {graphKey: $graphKey, type: 'Business Actor'}) RETURN e.id, e.name ORDER BY e.name
128
146
  3. Never submit write clauses (CREATE, MERGE, DELETE, SET, REMOVE, DROP, LOAD CSV, FOREACH, IN TRANSACTIONS); the interface rejects them to protect the canonical JSON single source of truth.
129
- 4. Use it for structural queries: list elements of a type, traverse ARCHIMATE_RELATES edges, count and aggregate. For semantic/context reading (subgraph context, dependency traversal, view membership), keep using getSystemArchitecture (semantic query), getIntentElementContext, and getArchitectureViewContext.
147
+ 4. Use it as the SECONDARY path for structural/type-based lookups that semantic retrieval does not cover: list elements of a type, traverse ARCHIMATE_RELATES edges, count and aggregate. Semantic-first KG retrieval — semantic/context reading (getSystemArchitecture with query.purpose + query.intent, getIntentElementContext, getArchitectureViewContext) is the PRIORITY path per <QueryPriorityGuideline>.
130
148
  5. The query is read-only; never attempt to mutate the graph through Cypher.
131
149
  </GraphQueryGuideline>
132
150
 
@@ -157,6 +157,16 @@ const TOOLS = [
157
157
  },
158
158
  intent: { type: 'string', description: 'Natural-language intent for semantic retrieval, for example "summarize business features for high-risk audit".' },
159
159
  subject: { type: 'string', description: 'Required for audit; optional anchor/focus id for other semantic purposes.' },
160
+ scope: {
161
+ type: 'object',
162
+ description: 'Optional subgraph scope to bound semantic retrieval and limit the returned content to a local region. Provide view_id to search within one view membership, or element_id (+ depth) to search within an element subtree.',
163
+ properties: {
164
+ view_id: { type: 'string', description: 'Restrict retrieval to the members of this view.' },
165
+ element_id: { type: 'string', description: 'Restrict retrieval to this element and its mounted sub-view subtree.' },
166
+ depth: { type: 'number', description: 'Default: 2. Subtree depth for element scope.' },
167
+ },
168
+ additionalProperties: false,
169
+ },
160
170
  },
161
171
  additionalProperties: true,
162
172
  },
@@ -68,6 +68,13 @@ const VECTOR_QUERY_CYPHER = [
68
68
  'RETURN properties(node) AS record, score',
69
69
  'ORDER BY score DESC',
70
70
  ].join('\n');
71
+ const VECTOR_QUERY_CYPHER_SCOPED = [
72
+ 'CALL db.index.vector.queryNodes($indexName, $topK, $vector)',
73
+ 'YIELD node, score',
74
+ 'WHERE node.channel = $channel AND node.canonicalIdentity IN $canonicalIdentities',
75
+ 'RETURN properties(node) AS record, score',
76
+ 'ORDER BY score DESC',
77
+ ].join('\n');
71
78
  const READINESS_QUERY_CYPHER = [
72
79
  'MATCH (readiness:ArgoProductionSemanticReadiness {identity: $identity})',
73
80
  'RETURN properties(readiness) AS readiness',
@@ -159,6 +166,7 @@ async function executeWpP2Retrieval({
159
166
  readiness,
160
167
  configurationEvidence,
161
168
  }) {
169
+ const { canonicalIdentities, ...completeRequest } = request;
162
170
  const provider = createLiveEmbeddingProviderClient({
163
171
  configuration: configurationEvidence.configuration,
164
172
  transport: composition.transport,
@@ -171,10 +179,13 @@ async function executeWpP2Retrieval({
171
179
  channel,
172
180
  neo4jDriver: composition.neo4jDriver,
173
181
  vector,
182
+ ...(Array.isArray(canonicalIdentities) && canonicalIdentities.length > 0
183
+ ? { canonicalIdentities }
184
+ : {}),
174
185
  });
175
186
  }
176
187
  return completeSemanticResult({
177
- request,
188
+ request: completeRequest,
178
189
  canonicalGraph,
179
190
  readiness,
180
191
  seedsByType,
@@ -609,7 +620,8 @@ function publicReadinessOutcome(alignment) {
609
620
  };
610
621
  }
611
622
 
612
- async function exhaustChannel({ channel, neo4jDriver, vector }) {
623
+ async function exhaustChannel({ channel, neo4jDriver, vector, canonicalIdentities }) {
624
+ const scoped = Array.isArray(canonicalIdentities) && canonicalIdentities.length > 0;
613
625
  const accepted = [];
614
626
  const seen = new Set();
615
627
  let offset = 0;
@@ -621,12 +633,13 @@ async function exhaustChannel({ channel, neo4jDriver, vector }) {
621
633
  windowSize: INITIAL_WINDOW_SIZE,
622
634
  topK: offset + INITIAL_WINDOW_SIZE,
623
635
  vector,
636
+ ...(scoped ? { canonicalIdentities } : {}),
624
637
  });
625
638
  const result = await neo4jDriver.execute(Object.freeze({
626
639
  kind: 'semantic-vector-window-query',
627
640
  channel: channel.channel,
628
641
  indexName: channel.indexName,
629
- cypher: VECTOR_QUERY_CYPHER,
642
+ cypher: scoped ? VECTOR_QUERY_CYPHER_SCOPED : VECTOR_QUERY_CYPHER,
630
643
  parameters,
631
644
  }));
632
645
  const records = Array.isArray(result && result.records) ? result.records : [];
@@ -204,6 +204,16 @@ const TOOLS = [
204
204
  },
205
205
  intent: { type: 'string', description: 'Natural-language intent for semantic retrieval, for example "summarize business features for high-risk audit".' },
206
206
  subject: { type: 'string', description: 'Required for audit; optional anchor/focus id for other semantic purposes.' },
207
+ scope: {
208
+ type: 'object',
209
+ description: 'Optional subgraph scope to bound semantic retrieval and limit the returned content to a local region. Provide view_id to search within one view membership, or element_id (+ depth) to search within an element subtree.',
210
+ properties: {
211
+ view_id: { type: 'string', description: 'Restrict retrieval to the members of this view.' },
212
+ element_id: { type: 'string', description: 'Restrict retrieval to this element and its mounted sub-view subtree.' },
213
+ depth: { type: 'number', description: 'Default: 2. Subtree depth for element scope.' },
214
+ },
215
+ additionalProperties: false,
216
+ },
207
217
  },
208
218
  additionalProperties: true,
209
219
  },
@@ -2291,6 +2301,16 @@ async function executeSemanticSystemArchitectureQuery(args, dependencies) {
2291
2301
  : {}),
2292
2302
  });
2293
2303
  const query = args.query;
2304
+ const scopeResolution = resolveSemanticScope(context.document, query && query.scope);
2305
+ if (scopeResolution.status === 'failed') {
2306
+ return getSystemArchitectureResult(queryError(
2307
+ scopeResolution.error.category,
2308
+ scopeResolution.error.message,
2309
+ ));
2310
+ }
2311
+ const queryForRetrieval = Array.isArray(scopeResolution.identities) && scopeResolution.identities.length > 0
2312
+ ? { ...(query || {}), canonicalIdentities: scopeResolution.identities }
2313
+ : query;
2294
2314
  const contractOptions = semanticContractOptions(args, dependencies);
2295
2315
  const canonicalSubsetContract = isCanonicalSubsetSemanticContract(query, contractOptions);
2296
2316
  if (canonicalSubsetContract) {
@@ -2310,7 +2330,7 @@ async function executeSemanticSystemArchitectureQuery(args, dependencies) {
2310
2330
  }
2311
2331
  let document;
2312
2332
  try {
2313
- const retrieved = await semanticRetrievalBoundary.retrieve(query);
2333
+ const retrieved = await semanticRetrievalBoundary.retrieve(queryForRetrieval);
2314
2334
  if (canonicalSubsetContract) {
2315
2335
  const subset = buildCanonicalSemanticDocumentSubset(retrieved, context.document);
2316
2336
  if (subset.status === 'failed') {
@@ -2352,6 +2372,14 @@ async function executeSemanticSystemArchitectureQuery(args, dependencies) {
2352
2372
  semanticErrorEvidence,
2353
2373
  ));
2354
2374
  }
2375
+ if (
2376
+ Array.isArray(scopeResolution.identities)
2377
+ && scopeResolution.identities.length > 0
2378
+ && document
2379
+ && typeof document === 'object'
2380
+ ) {
2381
+ document = applySemanticScopeFilter(document, scopeResolution.identities);
2382
+ }
2355
2383
  const semanticPayload = {
2356
2384
  status: 'passed',
2357
2385
  graphPath: context.graphPath.relativePath,
@@ -2381,6 +2409,109 @@ function shouldReturnDebugSemanticResult(query) {
2381
2409
  ).toLowerCase());
2382
2410
  }
2383
2411
 
2412
+ function resolveSemanticScope(document, scope) {
2413
+ if (!scope || typeof scope !== 'object') {
2414
+ return { identities: undefined };
2415
+ }
2416
+ const elements = new Set();
2417
+ const relationships = new Set();
2418
+ const views = new Set();
2419
+
2420
+ if (typeof scope.view_id === 'string' && scope.view_id) {
2421
+ const view = (document.views || []).find(item => item && item.view_id === scope.view_id);
2422
+ if (!view) {
2423
+ return {
2424
+ status: 'failed',
2425
+ error: {
2426
+ category: 'SCOPE_VIEW_NOT_FOUND',
2427
+ message: `Scope view '${scope.view_id}' does not exist in the canonical graph`,
2428
+ },
2429
+ };
2430
+ }
2431
+ (view.included_elements || []).forEach(id => elements.add(String(id)));
2432
+ (view.included_relationships || []).forEach(id => relationships.add(String(id)));
2433
+ views.add(String(scope.view_id));
2434
+ return { identities: scopeIdentitiesOf(elements, relationships, views) };
2435
+ }
2436
+
2437
+ if (typeof scope.element_id === 'string' && scope.element_id) {
2438
+ const root = (document.elements || []).find(item => item && item.id === scope.element_id);
2439
+ if (!root) {
2440
+ return {
2441
+ status: 'failed',
2442
+ error: {
2443
+ category: 'SCOPE_ELEMENT_NOT_FOUND',
2444
+ message: `Scope element '${scope.element_id}' does not exist in the canonical graph`,
2445
+ },
2446
+ };
2447
+ }
2448
+ const depth = Number.isInteger(scope.depth) && scope.depth > 0 ? scope.depth : 2;
2449
+ elements.add(String(scope.element_id));
2450
+ const queue = [{ elementId: scope.element_id, level: 0 }];
2451
+ const visited = new Set();
2452
+ while (queue.length > 0) {
2453
+ const { elementId, level } = queue.shift();
2454
+ if (visited.has(elementId)) continue;
2455
+ visited.add(elementId);
2456
+ const element = (document.elements || []).find(item => item && item.id === elementId);
2457
+ const subViews = Array.isArray(element && element.subdiagram_views)
2458
+ ? element.subdiagram_views
2459
+ : [];
2460
+ for (const subView of subViews) {
2461
+ const view = (document.views || []).find(item => item && item.view_id === subView.view_id);
2462
+ if (!view) continue;
2463
+ views.add(String(view.view_id));
2464
+ (view.included_relationships || []).forEach(id => relationships.add(String(id)));
2465
+ for (const childId of (view.included_elements || [])) {
2466
+ elements.add(String(childId));
2467
+ if (level < depth - 1) {
2468
+ queue.push({ elementId: childId, level: level + 1 });
2469
+ }
2470
+ }
2471
+ }
2472
+ }
2473
+ return { identities: scopeIdentitiesOf(elements, relationships, views) };
2474
+ }
2475
+
2476
+ return { identities: undefined };
2477
+ }
2478
+
2479
+ function scopeIdentitiesOf(elements, relationships, views) {
2480
+ return [...elements, ...relationships, ...views];
2481
+ }
2482
+
2483
+ function applySemanticScopeFilter(document, identities) {
2484
+ if (!document || typeof document !== 'object' || !Array.isArray(identities)) {
2485
+ return document;
2486
+ }
2487
+ const allowed = new Set(identities.map(id => String(id)));
2488
+ if (
2489
+ Array.isArray(document.elements)
2490
+ || Array.isArray(document.relationships)
2491
+ || Array.isArray(document.views)
2492
+ ) {
2493
+ return Object.freeze({
2494
+ ...document,
2495
+ elements: Object.freeze((document.elements || []).filter(item => item && allowed.has(String(item.id)))),
2496
+ relationships: Object.freeze((document.relationships || []).filter(item => item && allowed.has(String(item.id)))),
2497
+ views: Object.freeze((document.views || []).filter(item => item && allowed.has(String(item.view_id)))),
2498
+ });
2499
+ }
2500
+ if (document.businessObjects) {
2501
+ return Object.freeze({
2502
+ ...document,
2503
+ businessObjects: Object.freeze({
2504
+ elements: Object.freeze((document.businessObjects.elements || []).filter(item => item && allowed.has(String(item.id)))),
2505
+ relationships: Object.freeze((document.businessObjects.relationships || []).filter(item => item && allowed.has(String(item.id)))),
2506
+ views: Object.freeze((document.businessObjects.views || []).filter(item => item && allowed.has(String(item.view_id)))),
2507
+ }),
2508
+ semanticSeeds: Object.freeze((document.semanticSeeds || []).filter(seed => seed && allowed.has(String(seed.objectId)))),
2509
+ hitReasons: Object.freeze((document.hitReasons || []).filter(reason => reason && allowed.has(String(reason.objectId)))),
2510
+ });
2511
+ }
2512
+ return document;
2513
+ }
2514
+
2384
2515
  function buildBusinessSemanticSummary(retrieved, query = {}) {
2385
2516
  if (retrieved && retrieved.responseProfile === 'business-summary') return retrieved;
2386
2517
  if (retrieved && retrieved.result && retrieved.result.responseProfile === 'business-summary') return retrieved.result;
@@ -3348,8 +3479,10 @@ module.exports = {
3348
3479
  compactMutationResponse,
3349
3480
  createDefaultCanonicalSemanticInitComposition,
3350
3481
  createDefaultProductionSemanticOperatorJourney,
3482
+ applySemanticScopeFilter,
3351
3483
  handleRequest,
3352
3484
  loadContext,
3353
3485
  main,
3486
+ resolveSemanticScope,
3354
3487
  validateDocument,
3355
3488
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "archgraph-argo",
3
- "version": "0.10.30",
3
+ "version": "0.10.31",
4
4
  "description": "Deploy the ArchGraph ARGO toolchain, skills, and rules (schema, scripts, argo-init skill, global rule) with one command.",
5
5
  "license": "MIT",
6
6
  "bin": {