0xray 4.0.18 → 4.0.19

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 (65) hide show
  1. package/.grok-plugin/plugin.json +1 -1
  2. package/.xray/features.json +1 -1
  3. package/dist/CHANGELOG.md +12 -0
  4. package/dist/integrations/hooks/station-hook-runtime.cjs +6 -3
  5. package/dist/integrations/hooks/station-memory-match.mjs +8 -8
  6. package/dist/integrations/openclaw/plugin/xray-pre-tool/package.json +1 -1
  7. package/package.json +1 -1
  8. package/scripts/node/consumer-install-smoke.mjs +3 -3
  9. package/scripts/node/wear-vendored-repertoire.cjs +39 -1
  10. package/src/integrations/openclaw/plugin/xray-pre-tool/package.json +1 -1
  11. package/vendor/@0xray/repertoire/AGENTS.md +8 -2
  12. package/vendor/@0xray/repertoire/README.md +35 -8
  13. package/vendor/@0xray/repertoire/data/stack-overlay.json +750 -0
  14. package/vendor/@0xray/repertoire/data/subject-overlay.json +297 -0
  15. package/vendor/@0xray/repertoire/dist/RepertoireService.d.ts +36 -1
  16. package/vendor/@0xray/repertoire/dist/RepertoireService.d.ts.map +1 -1
  17. package/vendor/@0xray/repertoire/dist/RepertoireService.js +108 -18
  18. package/vendor/@0xray/repertoire/dist/RepertoireService.js.map +1 -1
  19. package/vendor/@0xray/repertoire/dist/index.d.ts +3 -1
  20. package/vendor/@0xray/repertoire/dist/index.d.ts.map +1 -1
  21. package/vendor/@0xray/repertoire/dist/index.js +3 -1
  22. package/vendor/@0xray/repertoire/dist/index.js.map +1 -1
  23. package/vendor/@0xray/repertoire/dist/ingestion/groover-log-ingester.d.ts +4 -0
  24. package/vendor/@0xray/repertoire/dist/ingestion/groover-log-ingester.d.ts.map +1 -1
  25. package/vendor/@0xray/repertoire/dist/ingestion/groover-log-ingester.js +15 -1
  26. package/vendor/@0xray/repertoire/dist/ingestion/groover-log-ingester.js.map +1 -1
  27. package/vendor/@0xray/repertoire/dist/ingestion/xray-session-ingester.d.ts +22 -8
  28. package/vendor/@0xray/repertoire/dist/ingestion/xray-session-ingester.d.ts.map +1 -1
  29. package/vendor/@0xray/repertoire/dist/ingestion/xray-session-ingester.js +56 -5
  30. package/vendor/@0xray/repertoire/dist/ingestion/xray-session-ingester.js.map +1 -1
  31. package/vendor/@0xray/repertoire/dist/mcp/server.js +8 -13
  32. package/vendor/@0xray/repertoire/dist/mcp/server.js.map +1 -1
  33. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/confidence-gate.d.ts.map +1 -1
  34. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/confidence-gate.js +24 -7
  35. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/confidence-gate.js.map +1 -1
  36. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/signal-injector.d.ts.map +1 -1
  37. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/signal-injector.js +2 -1
  38. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/signal-injector.js.map +1 -1
  39. package/vendor/@0xray/repertoire/dist/paths.d.ts +65 -2
  40. package/vendor/@0xray/repertoire/dist/paths.d.ts.map +1 -1
  41. package/vendor/@0xray/repertoire/dist/paths.js +377 -6
  42. package/vendor/@0xray/repertoire/dist/paths.js.map +1 -1
  43. package/vendor/@0xray/repertoire/dist/provider/memory-routing-provider.d.ts.map +1 -1
  44. package/vendor/@0xray/repertoire/dist/provider/memory-routing-provider.js +6 -8
  45. package/vendor/@0xray/repertoire/dist/provider/memory-routing-provider.js.map +1 -1
  46. package/vendor/@0xray/repertoire/dist/registry/CuratedSignalsManager.d.ts +20 -2
  47. package/vendor/@0xray/repertoire/dist/registry/CuratedSignalsManager.d.ts.map +1 -1
  48. package/vendor/@0xray/repertoire/dist/registry/CuratedSignalsManager.js +121 -8
  49. package/vendor/@0xray/repertoire/dist/registry/CuratedSignalsManager.js.map +1 -1
  50. package/vendor/@0xray/repertoire/dist/registry/InferenceStateManager.d.ts +2 -1
  51. package/vendor/@0xray/repertoire/dist/registry/InferenceStateManager.d.ts.map +1 -1
  52. package/vendor/@0xray/repertoire/dist/registry/InferenceStateManager.js +21 -3
  53. package/vendor/@0xray/repertoire/dist/registry/InferenceStateManager.js.map +1 -1
  54. package/vendor/@0xray/repertoire/dist/registry/confidence-decay.d.ts +40 -0
  55. package/vendor/@0xray/repertoire/dist/registry/confidence-decay.d.ts.map +1 -0
  56. package/vendor/@0xray/repertoire/dist/registry/confidence-decay.js +89 -0
  57. package/vendor/@0xray/repertoire/dist/registry/confidence-decay.js.map +1 -0
  58. package/vendor/@0xray/repertoire/dist/synthesis/meta-inference-engine.d.ts.map +1 -1
  59. package/vendor/@0xray/repertoire/dist/synthesis/meta-inference-engine.js +1 -0
  60. package/vendor/@0xray/repertoire/dist/synthesis/meta-inference-engine.js.map +1 -1
  61. package/vendor/@0xray/repertoire/dist/types.d.ts +5 -0
  62. package/vendor/@0xray/repertoire/dist/types.d.ts.map +1 -1
  63. package/vendor/@0xray/repertoire/package.json +4 -2
  64. package/vendor/@0xray/repertoire/scripts/verify-synthesis-dogfood.mjs +2 -2
  65. package/xray/features.json +1 -1
@@ -0,0 +1,297 @@
1
+ {
2
+ "description": "Subject-domain overlay: what each workspace organ/hangar is. Additive after factory seed + stack OP-PROC. Not the 0.1.8 dump. Groover is not Repertoire.",
3
+ "last_updated": "2026-09-22T00:00:00.000Z",
4
+ "source": "subject-overlay-4.0",
5
+ "schema_version": "1.0",
6
+ "implementation_guidance": {
7
+ "how_to_use": "hydrateWritableSignals merges these names into the project dest after stack-overlay. Existing names keep stats. Flesh repo-* from live package.json when the dest definition is still the generic field-observed stub.",
8
+ "integration_points": [
9
+ "hydrateWritableSignals",
10
+ "syncWorkspaceRepos",
11
+ "XraySessionIngester kernel diary"
12
+ ],
13
+ "priority_order": "factory traps, then OP-PROC stack, then subject repos. Never write the factory tarball."
14
+ },
15
+ "signals": [
16
+ {
17
+ "name": "repo-xray",
18
+ "definition": "0xRay suit exo. Three-subsystem OS (Inference, External Governance, Autonomous Engine). Cursor is fifth wear. Not a hangar.",
19
+ "tags": ["subject", "suit", "repo"],
20
+ "priority": "high",
21
+ "status": "proposed",
22
+ "first_seen": "2026-09-22",
23
+ "evaluation_criteria": "Task language about mill, Codex, Station heat, or consumer MCP routes to this name.",
24
+ "validation_experiment": "Ask getTaskConfidence about surviving the context window / Cursor hooks.",
25
+ "master_index_integration": "Project dest only. Factory tarball stays 8 names.",
26
+ "implementation_notes": "Hangar is not suit. Do not deploy this tarball onto website/blips/clearing.",
27
+ "example_inference_snippet": "0xRay suit that survives the context window. Cursor fifth wear. Mill plus inspect.",
28
+ "observation_stats": {
29
+ "observation_count": 1,
30
+ "avg_confidence": 0.55,
31
+ "max_confidence": 0.55,
32
+ "last_seen": "2026-09-22T00:00:00.000Z",
33
+ "governance_forced_count": 0
34
+ }
35
+ },
36
+ {
37
+ "name": "repo-repertoire",
38
+ "definition": "Judgment organ. Project dest is the living KB. Factory seed is 8 traps. Overlay OP-PROC is how we work. Subject names are what the stack is.",
39
+ "tags": ["subject", "organ", "repo"],
40
+ "priority": "high",
41
+ "status": "proposed",
42
+ "first_seen": "2026-09-22",
43
+ "evaluation_criteria": "Task language about dest, hydrate, kernel ingest, or long-running KB matches this name.",
44
+ "validation_experiment": "Ask getTaskConfidence about growing dest from 0xRay session files.",
45
+ "master_index_integration": "Project dest only.",
46
+ "implementation_notes": "Do not pin 0.1.8. Groover is not this organ.",
47
+ "example_inference_snippet": "Repertoire project dest is the long-running knowledge base. Factory seed is not the brain.",
48
+ "observation_stats": {
49
+ "observation_count": 1,
50
+ "avg_confidence": 0.55,
51
+ "max_confidence": 0.55,
52
+ "last_seen": "2026-09-22T00:00:00.000Z",
53
+ "governance_forced_count": 0
54
+ }
55
+ },
56
+ {
57
+ "name": "repo-clearing",
58
+ "definition": "Clearing hangar. x402 pay rail: spend USDC only on live endpoints, never twice. Sells receipted URL extracts. Not a suit.",
59
+ "tags": ["subject", "hangar", "repo"],
60
+ "priority": "high",
61
+ "status": "proposed",
62
+ "first_seen": "2026-09-22",
63
+ "evaluation_criteria": "Task language about x402, catalog, or receipted extract matches this name.",
64
+ "validation_experiment": "Ask getTaskConfidence about paying only live x402 services.",
65
+ "master_index_integration": "Project dest only. Hangar stays unsuitied unless an AI sits down.",
66
+ "implementation_notes": "Hangar is not suit. Do not invent Station as the hangar identity.",
67
+ "example_inference_snippet": "Pay only live x402 services. Never double-pay. Clearing catalog hangar.",
68
+ "observation_stats": {
69
+ "observation_count": 1,
70
+ "avg_confidence": 0.55,
71
+ "max_confidence": 0.55,
72
+ "last_seen": "2026-09-22T00:00:00.000Z",
73
+ "governance_forced_count": 0
74
+ }
75
+ },
76
+ {
77
+ "name": "repo-groover",
78
+ "definition": "Groover identity plus factory website hangar. MCP-native agent registry. Broken experiment of how Repertoire ingest was supposed to work. Not the organ.",
79
+ "tags": ["subject", "hangar", "repo"],
80
+ "priority": "high",
81
+ "status": "proposed",
82
+ "first_seen": "2026-09-22",
83
+ "evaluation_criteria": "Task language about the registry website or Groover field dump matches this name, not repertoire-is-long-running-kb.",
84
+ "validation_experiment": "Ask getTaskConfidence about Groover website hangar vs dest growth.",
85
+ "master_index_integration": "Remembered, not suited. Do not grow dest from Groover JSONL by default.",
86
+ "implementation_notes": "Groover is not Repertoire.",
87
+ "example_inference_snippet": "Groover factory website hangar. Not Repertoire. Do not grow dest from Groover field.",
88
+ "observation_stats": {
89
+ "observation_count": 1,
90
+ "avg_confidence": 0.55,
91
+ "max_confidence": 0.55,
92
+ "last_seen": "2026-09-22T00:00:00.000Z",
93
+ "governance_forced_count": 0
94
+ }
95
+ },
96
+ {
97
+ "name": "repo-blips",
98
+ "definition": "Blips hangar. 4.44s shorties that blip. Pay rail is Clearing x402. Product mill, not a suit.",
99
+ "tags": ["subject", "hangar", "repo"],
100
+ "priority": "medium",
101
+ "status": "proposed",
102
+ "first_seen": "2026-09-22",
103
+ "evaluation_criteria": "Task language about 4.44s mint or blips.rippel.ai matches this name.",
104
+ "validation_experiment": "Ask getTaskConfidence about minting a 4.44s blip.",
105
+ "master_index_integration": "Hangar. Do not deploy 0xray tarball here.",
106
+ "implementation_notes": "Hangar is not suit.",
107
+ "example_inference_snippet": "Blips 4.44s mint hangar. Clearing x402 pay rail.",
108
+ "observation_stats": {
109
+ "observation_count": 1,
110
+ "avg_confidence": 0.55,
111
+ "max_confidence": 0.55,
112
+ "last_seen": "2026-09-22T00:00:00.000Z",
113
+ "governance_forced_count": 0
114
+ }
115
+ },
116
+ {
117
+ "name": "repo-jelly",
118
+ "definition": "Jelly is dormant. Old multi-tenant sandbox / no-code 0xRay container vision. Not the current hangar story.",
119
+ "tags": ["subject", "dormant", "repo"],
120
+ "priority": "medium",
121
+ "status": "proposed",
122
+ "first_seen": "2026-09-22",
123
+ "evaluation_criteria": "Task language about Blaxel sandboxes or no-code containers matches this name.",
124
+ "validation_experiment": "Ask getTaskConfidence about Jelly being dormant.",
125
+ "master_index_integration": "Remembered as dormant. Do not treat as the live hangar.",
126
+ "implementation_notes": "jelly-is-dormant is OP-PROC. This name is the product subject.",
127
+ "example_inference_snippet": "Jelly multi-tenant sandbox is dormant. Not the current hangar.",
128
+ "observation_stats": {
129
+ "observation_count": 1,
130
+ "avg_confidence": 0.55,
131
+ "max_confidence": 0.55,
132
+ "last_seen": "2026-09-22T00:00:00.000Z",
133
+ "governance_forced_count": 0
134
+ }
135
+ },
136
+ {
137
+ "name": "repo-jelly-engine",
138
+ "definition": "Jelly autonomous engine. Standalone orchestration leftover of the dormant Jelly product. Not 0xRay mill.",
139
+ "tags": ["subject", "dormant", "repo"],
140
+ "priority": "low",
141
+ "status": "proposed",
142
+ "first_seen": "2026-09-22",
143
+ "evaluation_criteria": "Task language about the standalone Jelly engine matches this name.",
144
+ "validation_experiment": "Ask getTaskConfidence about jelly-engine vs 0xRay.",
145
+ "master_index_integration": "Dormant sibling. Hangar-adjacent, not a suit.",
146
+ "implementation_notes": "Do not confuse with 0xRay kernel.",
147
+ "example_inference_snippet": "Jelly engine standalone autonomous leftover. Dormant with Jelly.",
148
+ "observation_stats": {
149
+ "observation_count": 1,
150
+ "avg_confidence": 0.55,
151
+ "max_confidence": 0.55,
152
+ "last_seen": "2026-09-22T00:00:00.000Z",
153
+ "governance_forced_count": 0
154
+ }
155
+ },
156
+ {
157
+ "name": "repo-zigzag",
158
+ "definition": "ZigZag hangar. Hybrid non-custodial agent wallet and x402 payments. Money rail, not a suit.",
159
+ "tags": ["subject", "hangar", "repo"],
160
+ "priority": "medium",
161
+ "status": "proposed",
162
+ "first_seen": "2026-09-22",
163
+ "evaluation_criteria": "Task language about agent wallets or EIP-3009 matches this name.",
164
+ "validation_experiment": "Ask getTaskConfidence about non-custodial x402 wallet.",
165
+ "master_index_integration": "Hangar. Do not fasten mill as identity.",
166
+ "implementation_notes": "Hangar is not suit.",
167
+ "example_inference_snippet": "ZigZag non-custodial agent wallet and x402 payments hangar.",
168
+ "observation_stats": {
169
+ "observation_count": 1,
170
+ "avg_confidence": 0.55,
171
+ "max_confidence": 0.55,
172
+ "last_seen": "2026-09-22T00:00:00.000Z",
173
+ "governance_forced_count": 0
174
+ }
175
+ },
176
+ {
177
+ "name": "repo-review-suit",
178
+ "definition": "Review-suit hire overlay. Mill plus inspect uniform with a review job. A job posting, not mill plant and not a hangar.",
179
+ "tags": ["subject", "suit", "repo"],
180
+ "priority": "medium",
181
+ "status": "proposed",
182
+ "first_seen": "2026-09-22",
183
+ "evaluation_criteria": "Task language about review-suit hire matches this name.",
184
+ "validation_experiment": "Ask getTaskConfidence about the review job overlay.",
185
+ "master_index_integration": "Wear overlay. Not hangar commerce.",
186
+ "implementation_notes": "Example hire from the 0xRay org.",
187
+ "example_inference_snippet": "Review-suit mill plus inspect hire overlay. Job posting, not hangar.",
188
+ "observation_stats": {
189
+ "observation_count": 1,
190
+ "avg_confidence": 0.55,
191
+ "max_confidence": 0.55,
192
+ "last_seen": "2026-09-22T00:00:00.000Z",
193
+ "governance_forced_count": 0
194
+ }
195
+ },
196
+ {
197
+ "name": "repo-scout",
198
+ "definition": "Scout periphery repo. Adjacent tooling. Not Station and not the organ.",
199
+ "tags": ["subject", "periphery", "repo"],
200
+ "priority": "low",
201
+ "status": "proposed",
202
+ "first_seen": "2026-09-22",
203
+ "evaluation_criteria": "Task language naming Scout as a sibling matches this name.",
204
+ "validation_experiment": "Ask getTaskConfidence about scout sibling.",
205
+ "master_index_integration": "Remembered map entry.",
206
+ "implementation_notes": "Do not confuse with Station.",
207
+ "example_inference_snippet": "Scout periphery sibling. Not Station.",
208
+ "observation_stats": {
209
+ "observation_count": 1,
210
+ "avg_confidence": 0.55,
211
+ "max_confidence": 0.55,
212
+ "last_seen": "2026-09-22T00:00:00.000Z",
213
+ "governance_forced_count": 0
214
+ }
215
+ },
216
+ {
217
+ "name": "repo-ziggy",
218
+ "definition": "Ziggy tweet-generator MCP. Periphery tool. Not 0xRay mill and not Repertoire.",
219
+ "tags": ["subject", "periphery", "repo"],
220
+ "priority": "low",
221
+ "status": "proposed",
222
+ "first_seen": "2026-09-22",
223
+ "evaluation_criteria": "Task language about quippy tweets or ziggy-mcp matches this name.",
224
+ "validation_experiment": "Ask getTaskConfidence about the tweet MCP.",
225
+ "master_index_integration": "Remembered map entry.",
226
+ "implementation_notes": "Periphery. Hangar-adjacent tool.",
227
+ "example_inference_snippet": "Ziggy quippy tweet generator MCP.",
228
+ "observation_stats": {
229
+ "observation_count": 1,
230
+ "avg_confidence": 0.55,
231
+ "max_confidence": 0.55,
232
+ "last_seen": "2026-09-22T00:00:00.000Z",
233
+ "governance_forced_count": 0
234
+ }
235
+ },
236
+ {
237
+ "name": "repo-meaningful-compression",
238
+ "definition": "Meaningful Compression. Hyperbolic markup and synaptical composability experiment. Periphery, not the organ.",
239
+ "tags": ["subject", "periphery", "repo"],
240
+ "priority": "low",
241
+ "status": "proposed",
242
+ "first_seen": "2026-09-22",
243
+ "evaluation_criteria": "Task language about meaningful compression matches this name.",
244
+ "validation_experiment": "Ask getTaskConfidence about hyperbolic markup compression.",
245
+ "master_index_integration": "Remembered map entry.",
246
+ "implementation_notes": "Not Repertoire dest.",
247
+ "example_inference_snippet": "Meaningful compression hyperbolic markup experiment.",
248
+ "observation_stats": {
249
+ "observation_count": 1,
250
+ "avg_confidence": 0.55,
251
+ "max_confidence": 0.55,
252
+ "last_seen": "2026-09-22T00:00:00.000Z",
253
+ "governance_forced_count": 0
254
+ }
255
+ },
256
+ {
257
+ "name": "repo-chrono-warp-drive",
258
+ "definition": "Chrono / Dynamo temporal resonance seat. Live solar physics documents. Adjacent to the suit, not the organ.",
259
+ "tags": ["subject", "periphery", "repo"],
260
+ "priority": "low",
261
+ "status": "proposed",
262
+ "first_seen": "2026-09-22",
263
+ "evaluation_criteria": "Task language about Dynamo temporal documents matches this name.",
264
+ "validation_experiment": "Ask getTaskConfidence about temporal resonance engine.",
265
+ "master_index_integration": "Remembered. Directory may slug as repo-vite-react-shadcn-ts; flesh from live package.json.",
266
+ "implementation_notes": "Sibling walk uses package name. Dir fallback chrono-warp-drive.",
267
+ "example_inference_snippet": "Dynamo temporal resonance engine. Chrono warp drive.",
268
+ "observation_stats": {
269
+ "observation_count": 1,
270
+ "avg_confidence": 0.55,
271
+ "max_confidence": 0.55,
272
+ "last_seen": "2026-09-22T00:00:00.000Z",
273
+ "governance_forced_count": 0
274
+ }
275
+ },
276
+ {
277
+ "name": "repo-piddy-sequencer",
278
+ "definition": "Piddy sequencer periphery. Adjacent app seat. Not mill and not Repertoire.",
279
+ "tags": ["subject", "periphery", "repo"],
280
+ "priority": "low",
281
+ "status": "proposed",
282
+ "first_seen": "2026-09-22",
283
+ "evaluation_criteria": "Task language naming piddy matches this name.",
284
+ "validation_experiment": "Ask getTaskConfidence about piddy sequencer.",
285
+ "master_index_integration": "Remembered map entry.",
286
+ "implementation_notes": "piddy and piddy2 share this package name.",
287
+ "example_inference_snippet": "Piddy sequencer periphery app.",
288
+ "observation_stats": {
289
+ "observation_count": 1,
290
+ "avg_confidence": 0.55,
291
+ "max_confidence": 0.55,
292
+ "last_seen": "2026-09-22T00:00:00.000Z",
293
+ "governance_forced_count": 0
294
+ }
295
+ }
296
+ ]
297
+ }
@@ -4,6 +4,7 @@ import { MetaInferenceEngine } from './synthesis/meta-inference-engine.js';
4
4
  import { OrchestratorFeedbackIngester } from './ingestion/orchestrator-feedback-ingester.js';
5
5
  import { RepertoireOrchestratorBridge } from './orchestrator-bridge/RepertoireOrchestratorBridge.js';
6
6
  import { OntologicalTrapEnforcer, type GovernWithSolarFn } from './governance/ontological-trap-enforcer.js';
7
+ import { type KernelDiaryCollect, type OpProcReload } from './paths.js';
7
8
  import type { AgentCapability, CuratedSignal, ExecutionPlan, OrchestrationTask, OrchestratorFeedbackEntry, RepertoireInheritedContext, RepertoireRoutingContext, SynthesisReport, TaskConfidenceContext } from './types.js';
8
9
  export interface RepertoireServiceOptions {
9
10
  dataDir?: string;
@@ -12,6 +13,10 @@ export interface RepertoireServiceOptions {
12
13
  statePath?: string;
13
14
  feedbackDir?: string;
14
15
  projectRoot?: string;
16
+ /** Grow dest from sibling field JSONL. Default on outside Vitest. */
17
+ syncField?: boolean;
18
+ /** Grow dest from 0xRay session-capture + sibling repo map. Default on outside Vitest. */
19
+ syncXray?: boolean;
15
20
  }
16
21
  export declare class RepertoireService {
17
22
  readonly signalsManager: CuratedSignalsManager;
@@ -20,7 +25,14 @@ export declare class RepertoireService {
20
25
  readonly metaInference: MetaInferenceEngine;
21
26
  readonly feedbackIngester: OrchestratorFeedbackIngester;
22
27
  private readonly logDir;
28
+ private readonly projectRoot;
23
29
  constructor(options?: RepertoireServiceOptions);
30
+ syncFieldMemory(sourceDirs?: string[]): {
31
+ imported: number;
32
+ skipped: number;
33
+ promoted: string[];
34
+ sources: string[];
35
+ };
24
36
  ingestGrooverLogs(sourceDir: string, options?: {
25
37
  dryRun?: boolean;
26
38
  }): {
@@ -28,10 +40,33 @@ export declare class RepertoireService {
28
40
  skipped: number;
29
41
  promoted: string[];
30
42
  };
31
- ingestXraySessions(sourceDir: string): {
43
+ ingestXraySessions(sourceDir: string, options?: {
44
+ repoPrimitive?: string;
45
+ }): {
46
+ imported: number;
47
+ skipped: number;
48
+ promoted: string[];
49
+ };
50
+ syncXrayMemory(sourceDirs?: string[]): {
32
51
  imported: number;
33
52
  skipped: number;
53
+ promoted: string[];
54
+ sources: string[];
55
+ };
56
+ syncWorkspaceRepos(): {
57
+ observed: string[];
58
+ fleshed: string[];
59
+ sources: string[];
60
+ };
61
+ /**
62
+ * Heat existing dest names from kernel diary text. No new names.
63
+ * Colon pattern ids like `architect:architect_skill` never become dest keys.
64
+ */
65
+ heatKernelDiary(collected?: KernelDiaryCollect): {
66
+ heated: string[];
67
+ sources: string[];
34
68
  };
69
+ reloadOpProc(): OpProcReload;
35
70
  ingestOrchestratorFeedback(entry: OrchestratorFeedbackEntry): {
36
71
  logPath: string;
37
72
  updatedSignals: FeedbackOutcomeResult[];
@@ -1 +1 @@
1
- {"version":3,"file":"RepertoireService.d.ts","sourceRoot":"","sources":["../src/RepertoireService.ts"],"names":[],"mappings":"AACA,OAAO,EACL,qBAAqB,EACrB,KAAK,qBAAqB,EAC3B,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAC5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAG3E,OAAO,EAAE,4BAA4B,EAAE,MAAM,+CAA+C,CAAC;AAC7F,OAAO,EAAE,4BAA4B,EAAE,MAAM,uDAAuD,CAAC;AACrG,OAAO,EACL,uBAAuB,EACvB,KAAK,iBAAiB,EACvB,MAAM,2CAA2C,CAAC;AAYnD,OAAO,KAAK,EACV,eAAe,EACf,aAAa,EACb,aAAa,EACb,iBAAiB,EACjB,yBAAyB,EACzB,0BAA0B,EAC1B,wBAAwB,EACxB,eAAe,EACf,qBAAqB,EACtB,MAAM,YAAY,CAAC;AAEpB,MAAM,WAAW,wBAAwB;IACvC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAA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AE,MAAM,CAAC;KACX,GAAG,KAAK,CAAC,aAAa,GAAG;QAAE,mBAAmB,EAAE,MAAM,CAAA;KAAE,CAAC;IA2B/D,iBAAiB,CAAC,KAAK,EAAE;QACvB,WAAW,EAAE,MAAM,CAAC;QACpB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,EAAE,CAAC,EAAE,MAAM,CAAC;KACb,GAAG,qBAAqB;IASzB,gBAAgB,CACd,KAAK,EAAE,MAAM,EACb,OAAO,GAAE;QAAE,aAAa,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAO,GACvD,KAAK,CAAC;QACP,IAAI,EAAE,MAAM,CAAC;QACb,UAAU,EAAE,MAAM,CAAC;QACnB,QAAQ,EAAE,MAAM,CAAC;QACjB,UAAU,EAAE,MAAM,CAAC;QACnB,IAAI,EAAE,MAAM,EAAE,CAAC;QACf,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,gBAAgB,EAAE,MAAM,CAAC;KAC1B,CAAC;CA2BH"}
@@ -8,7 +8,8 @@ import { OrchestratorFeedbackIngester } from './ingestion/orchestrator-feedback-
8
8
  import { RepertoireOrchestratorBridge } from './orchestrator-bridge/RepertoireOrchestratorBridge.js';
9
9
  import { OntologicalTrapEnforcer, } from './governance/ontological-trap-enforcer.js';
10
10
  import { DEFAULT_MIN_CONFIDENCE_GATE } from './orchestrator-bridge/confidence-gate.js';
11
- import { DEFAULT_DATA_DIR, DEFAULT_FEEDBACK_DIR, DEFAULT_LOG_DIR, DEFAULT_SIGNALS_PATH, DEFAULT_STATE_PATH, defaultProjectStateDir, hydrateWritableSignals, isRepertoirePackageCwd, } from './paths.js';
11
+ import { effectiveSignalConfidence, meetsConfidenceGate } from './registry/confidence-decay.js';
12
+ import { DEFAULT_SIGNALS_PATH, collectKernelDiaryText, defaultWritablePaths, discoverFieldLogDirs, discoverSiblingRepos, discoverXrayKernelDirs, hydrateWritableSignals, isGenericFieldObservedDefinition, reloadOpProc, shouldAutoSyncField, shouldAutoSyncXray, } from './paths.js';
12
13
  export class RepertoireService {
13
14
  signalsManager;
14
15
  stateManager;
@@ -16,46 +17,133 @@ export class RepertoireService {
16
17
  metaInference;
17
18
  feedbackIngester;
18
19
  logDir;
20
+ projectRoot;
19
21
  constructor(options = {}) {
20
22
  const cwd = options.projectRoot ?? process.cwd();
21
- const inOrganRepo = isRepertoirePackageCwd(cwd);
22
- const projectState = defaultProjectStateDir(cwd);
23
- const dataDir = options.dataDir ?? (inOrganRepo ? DEFAULT_DATA_DIR : projectState);
24
- this.logDir = options.logDir ?? (inOrganRepo ? DEFAULT_LOG_DIR : join(projectState, 'logs'));
23
+ this.projectRoot = cwd;
24
+ const writable = defaultWritablePaths(cwd);
25
+ const dataDir = options.dataDir ?? writable.dataDir;
26
+ this.logDir = options.logDir ?? writable.logDir;
25
27
  const seed = options.signalsPath ??
26
28
  (options.dataDir ? join(dataDir, 'curated_signals.json') : DEFAULT_SIGNALS_PATH);
27
29
  this.signalsManager = new CuratedSignalsManager(hydrateWritableSignals(seed, cwd));
28
- this.stateManager = new InferenceStateManager(options.statePath ??
29
- (inOrganRepo
30
- ? options.dataDir
31
- ? join(dataDir, 'inference-state.json')
32
- : DEFAULT_STATE_PATH
33
- : join(projectState, 'inference-state.json')));
30
+ this.stateManager = new InferenceStateManager(options.statePath ?? writable.statePath);
34
31
  this.orchestratorBridge = new RepertoireOrchestratorBridge(this.signalsManager);
35
32
  this.metaInference = new MetaInferenceEngine({
36
33
  logDir: this.logDir,
37
- statePath: options.statePath ??
38
- (inOrganRepo ? DEFAULT_STATE_PATH : join(projectState, 'inference-state.json')),
34
+ statePath: options.statePath ?? writable.statePath,
39
35
  });
40
- this.feedbackIngester = new OrchestratorFeedbackIngester(options.feedbackDir ?? (inOrganRepo ? DEFAULT_FEEDBACK_DIR : join(projectState, 'feedback')));
36
+ this.feedbackIngester = new OrchestratorFeedbackIngester(options.feedbackDir ?? writable.feedbackDir);
37
+ if (shouldAutoSyncField(options.syncField)) {
38
+ this.syncFieldMemory();
39
+ }
40
+ if (shouldAutoSyncXray(options.syncXray)) {
41
+ this.syncXrayMemory();
42
+ this.syncWorkspaceRepos();
43
+ this.heatKernelDiary();
44
+ }
45
+ }
46
+ syncFieldMemory(sourceDirs) {
47
+ const sources = sourceDirs ?? discoverFieldLogDirs(this.projectRoot);
48
+ let imported = 0;
49
+ let skipped = 0;
50
+ const promoted = [];
51
+ for (const sourceDir of sources) {
52
+ const result = this.ingestGrooverLogs(sourceDir);
53
+ imported += result.imported;
54
+ skipped += result.skipped;
55
+ for (const name of result.promoted) {
56
+ if (!promoted.includes(name))
57
+ promoted.push(name);
58
+ }
59
+ }
60
+ return { imported, skipped, promoted, sources };
41
61
  }
42
62
  ingestGrooverLogs(sourceDir, options = {}) {
43
63
  const ingester = new GrooverLogIngester({
44
64
  sourceDir,
45
65
  targetDir: this.logDir,
46
66
  signalsManager: this.signalsManager,
67
+ stateManager: this.stateManager,
47
68
  dryRun: options.dryRun,
48
69
  });
49
70
  return ingester.ingest();
50
71
  }
51
- ingestXraySessions(sourceDir) {
72
+ ingestXraySessions(sourceDir, options = {}) {
52
73
  const ingester = new XraySessionIngester({
53
74
  sourceDir,
54
75
  targetDir: this.logDir,
55
76
  signalsManager: this.signalsManager,
77
+ stateManager: this.stateManager,
78
+ repoPrimitive: options.repoPrimitive,
56
79
  });
57
80
  return ingester.ingest();
58
81
  }
82
+ syncXrayMemory(sourceDirs) {
83
+ const sources = sourceDirs ?? discoverXrayKernelDirs(this.projectRoot);
84
+ let imported = 0;
85
+ let skipped = 0;
86
+ const promoted = [];
87
+ for (const sourceDir of sources) {
88
+ const result = this.ingestXraySessions(sourceDir);
89
+ imported += result.imported;
90
+ skipped += result.skipped;
91
+ for (const name of result.promoted) {
92
+ if (!promoted.includes(name))
93
+ promoted.push(name);
94
+ }
95
+ }
96
+ return { imported, skipped, promoted, sources };
97
+ }
98
+ syncWorkspaceRepos() {
99
+ const siblings = discoverSiblingRepos(this.projectRoot);
100
+ const observed = [];
101
+ const fleshed = [];
102
+ const sources = [];
103
+ const matches = siblings.map((sibling) => {
104
+ sources.push(sibling.root);
105
+ return { name: sibling.primitive, confidence: 0.55 };
106
+ });
107
+ if (matches.length > 0) {
108
+ const grown = this.signalsManager.recordPrimitiveObservations(matches);
109
+ for (const name of grown) {
110
+ if (!observed.includes(name))
111
+ observed.push(name);
112
+ }
113
+ }
114
+ for (const sibling of siblings) {
115
+ const existing = this.signalsManager.getByName(sibling.primitive);
116
+ if (!existing ||
117
+ !isGenericFieldObservedDefinition(existing.definition) ||
118
+ !sibling.description.trim()) {
119
+ continue;
120
+ }
121
+ if (this.signalsManager.fleshGenericRepoSignal(sibling.primitive, sibling.description, sibling.description)) {
122
+ fleshed.push(sibling.primitive);
123
+ }
124
+ }
125
+ return { observed, fleshed, sources };
126
+ }
127
+ /**
128
+ * Heat existing dest names from kernel diary text. No new names.
129
+ * Colon pattern ids like `architect:architect_skill` never become dest keys.
130
+ */
131
+ heatKernelDiary(collected) {
132
+ const diary = collected ?? collectKernelDiaryText(this.projectRoot);
133
+ if (!diary.text.trim()) {
134
+ return { heated: [], sources: diary.sources };
135
+ }
136
+ const hits = this.signalsManager.matchByText(diary.text, 2);
137
+ const matches = hits.map((hit) => ({
138
+ name: hit.signal.name,
139
+ confidence: 0.55,
140
+ }));
141
+ const heated = matches.length > 0 ? this.signalsManager.recordPrimitiveObservations(matches) : [];
142
+ return { heated, sources: diary.sources };
143
+ }
144
+ reloadOpProc() {
145
+ return reloadOpProc(this.projectRoot);
146
+ }
59
147
  ingestOrchestratorFeedback(entry) {
60
148
  const logPath = this.feedbackIngester.ingest(entry);
61
149
  const updatedSignals = this.signalsManager.recordFeedbackOutcome(entry);
@@ -109,7 +197,8 @@ export class RepertoireService {
109
197
  })
110
198
  .map((signal) => ({
111
199
  ...signal,
112
- effectiveConfidence: signal.observation_stats.avg_confidence,
200
+ effectiveConfidence: effectiveSignalConfidence(signal)?.effectiveConfidence ??
201
+ signal.observation_stats.avg_confidence,
113
202
  }))
114
203
  .sort((a, b) => b.effectiveConfidence - a.effectiveConfidence ||
115
204
  (b.observation_stats?.observation_count ?? 0) -
@@ -131,7 +220,8 @@ export class RepertoireService {
131
220
  return matches
132
221
  .map((match) => {
133
222
  const stats = match.signal.observation_stats;
134
- const confidence = stats?.avg_confidence;
223
+ const decayed = effectiveSignalConfidence(match.signal);
224
+ const confidence = decayed?.effectiveConfidence ?? stats?.avg_confidence;
135
225
  if (stats === undefined || confidence === undefined)
136
226
  return null;
137
227
  return {
@@ -145,7 +235,7 @@ export class RepertoireService {
145
235
  };
146
236
  })
147
237
  .filter((entry) => entry !== null)
148
- .filter((entry) => entry.confidence >= minConfidence)
238
+ .filter((entry) => meetsConfidenceGate(entry.confidence, minConfidence))
149
239
  .sort((a, b) => b.confidence - a.confidence)
150
240
  .slice(0, limit);
151
241
  }
@@ -1 +1 @@
1
- {"version":3,"file":"RepertoireService.js","sourceRoot":"","sources":["../src/RepertoireService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EACL,qBAAqB,GAEtB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAC5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAC3E,OAAO,EAAE,4BAA4B,EAAE,MAAM,+CAA+C,CAAC;AAC7F,OAAO,EAAE,4BAA4B,EAAE,MAAM,uDAAuD,CAAC;AACrG,OAAO,EACL,uBAAuB,GAExB,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,2BAA2B,EAAE,MAAM,0CAA0C,CAAC;AACvF,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,eAAe,EACf,oBAAoB,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a,CAAC,CAAC;aACvE,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,GAAG,CAAC,CAAC,UAAU,CAAC;aAC3C,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;IACrB,CAAC;CACF"}
@@ -1,9 +1,11 @@
1
1
  export { RepertoireService } from './RepertoireService.js';
2
- export { CuratedSignalsManager } from './registry/CuratedSignalsManager.js';
2
+ export { CuratedSignalsManager, isFieldPrimitiveName, proposeFieldObservedSignal, repoPrimitiveName, slugFieldPrimitiveName, } from './registry/CuratedSignalsManager.js';
3
3
  export { pruneSignals, shouldPruneSignal } from './registry/signal-prune.js';
4
+ export { decayFactorForAge, effectiveObservationConfidence, meetsConfidenceGate, effectiveSignalConfidence, rawDecayedConfidence, shouldDemoteValidatedSignal, DEFAULT_DECAY_GRACE_DAYS, DEFAULT_DECAY_HALF_LIFE_DAYS, DEFAULT_DEMOTION_MIN_OBSERVATIONS, } from './registry/confidence-decay.js';
4
5
  export { InferenceStateManager } from './registry/InferenceStateManager.js';
5
6
  export { MetaInferenceEngine } from './synthesis/meta-inference-engine.js';
6
7
  export { GrooverLogIngester } from './ingestion/groover-log-ingester.js';
8
+ export { collectKernelDiaryText, discoverFieldLogDirs, discoverSiblingRepos, discoverXrayKernelDirs, isGenericFieldObservedDefinition, mergeSubjectOverlay, reloadOpProc, shouldAutoSyncField, shouldAutoSyncXray, defaultWritablePaths, } from './paths.js';
7
9
  export { aggregateWeightedPrimitives, formatWeightedPrimitivesSection, } from './synthesis/primitive-confidence-aggregator.js';
8
10
  export { XraySessionIngester } from './ingestion/xray-session-ingester.js';
9
11
  export { OrchestratorFeedbackIngester } from './ingestion/orchestrator-feedback-ingester.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,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C;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACpB,oBAAoB,EACpB,sBAAsB,EACtB,gCAAgC,EAChC,mBAAmB,EACnB,YAAY,EACZ,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,2BAA2B,EAC3B,+BAA+B,GAChC,MAAM,gDAAgD,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAC3E,OAAO,EAAE,4BAA4B,EAAE,MAAM,+CAA+C,CAAC;AAC7F,OAAO,EAAE,4BAA4B,EAAE,MAAM,uDAAuD,CAAC;AACrG,OAAO,EACL,oBAAoB,EACpB,2BAA2B,EAC3B,mBAAmB,GACpB,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AACpF,cAAc,YAAY,CAAC"}
@@ -1,9 +1,11 @@
1
1
  export { RepertoireService } from './RepertoireService.js';
2
- export { CuratedSignalsManager } from './registry/CuratedSignalsManager.js';
2
+ export { CuratedSignalsManager, isFieldPrimitiveName, proposeFieldObservedSignal, repoPrimitiveName, slugFieldPrimitiveName, } from './registry/CuratedSignalsManager.js';
3
3
  export { pruneSignals, shouldPruneSignal } from './registry/signal-prune.js';
4
+ export { decayFactorForAge, effectiveObservationConfidence, meetsConfidenceGate, effectiveSignalConfidence, rawDecayedConfidence, shouldDemoteValidatedSignal, DEFAULT_DECAY_GRACE_DAYS, DEFAULT_DECAY_HALF_LIFE_DAYS, DEFAULT_DEMOTION_MIN_OBSERVATIONS, } from './registry/confidence-decay.js';
4
5
  export { InferenceStateManager } from './registry/InferenceStateManager.js';
5
6
  export { MetaInferenceEngine } from './synthesis/meta-inference-engine.js';
6
7
  export { GrooverLogIngester } from './ingestion/groover-log-ingester.js';
8
+ export { collectKernelDiaryText, discoverFieldLogDirs, discoverSiblingRepos, discoverXrayKernelDirs, isGenericFieldObservedDefinition, mergeSubjectOverlay, reloadOpProc, shouldAutoSyncField, shouldAutoSyncXray, defaultWritablePaths, } from './paths.js';
7
9
  export { aggregateWeightedPrimitives, formatWeightedPrimitivesSection, } from './synthesis/primitive-confidence-aggregator.js';
8
10
  export { XraySessionIngester } from './ingestion/xray-session-ingester.js';
9
11
  export { OrchestratorFeedbackIngester } from './ingestion/orchestrator-feedback-ingester.js';