@dsh-enhanced/assistant-skills 0.1.30

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 (84) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +211 -0
  3. package/cordis.patch.yml +3 -0
  4. package/lib/capture-expansion.d.ts +18 -0
  5. package/lib/capture-expansion.d.ts.map +1 -0
  6. package/lib/capture-expansion.js +187 -0
  7. package/lib/capture-expansion.js.map +1 -0
  8. package/lib/comparison.d.ts +69 -0
  9. package/lib/comparison.d.ts.map +1 -0
  10. package/lib/comparison.js +173 -0
  11. package/lib/comparison.js.map +1 -0
  12. package/lib/definition.d.ts +163 -0
  13. package/lib/definition.d.ts.map +1 -0
  14. package/lib/definition.js +450 -0
  15. package/lib/definition.js.map +1 -0
  16. package/lib/external-holdout.d.ts +34 -0
  17. package/lib/external-holdout.d.ts.map +1 -0
  18. package/lib/external-holdout.js +212 -0
  19. package/lib/external-holdout.js.map +1 -0
  20. package/lib/holdout-authority.d.ts +123 -0
  21. package/lib/holdout-authority.d.ts.map +1 -0
  22. package/lib/holdout-authority.js +263 -0
  23. package/lib/holdout-authority.js.map +1 -0
  24. package/lib/holdout-cli.d.ts +4 -0
  25. package/lib/holdout-cli.d.ts.map +1 -0
  26. package/lib/holdout-cli.js +221 -0
  27. package/lib/holdout-cli.js.map +1 -0
  28. package/lib/holdout-qualification.d.ts +83 -0
  29. package/lib/holdout-qualification.d.ts.map +1 -0
  30. package/lib/holdout-qualification.js +306 -0
  31. package/lib/holdout-qualification.js.map +1 -0
  32. package/lib/index.d.ts +22 -0
  33. package/lib/index.d.ts.map +1 -0
  34. package/lib/index.js +9 -0
  35. package/lib/index.js.map +1 -0
  36. package/lib/prospective-holdout.d.ts +35 -0
  37. package/lib/prospective-holdout.d.ts.map +1 -0
  38. package/lib/prospective-holdout.js +254 -0
  39. package/lib/prospective-holdout.js.map +1 -0
  40. package/lib/repair-admission.d.ts +11 -0
  41. package/lib/repair-admission.d.ts.map +1 -0
  42. package/lib/repair-admission.js +25 -0
  43. package/lib/repair-admission.js.map +1 -0
  44. package/lib/repair-agent.d.ts +44 -0
  45. package/lib/repair-agent.d.ts.map +1 -0
  46. package/lib/repair-agent.js +241 -0
  47. package/lib/repair-agent.js.map +1 -0
  48. package/lib/repair-feedback.d.ts +70 -0
  49. package/lib/repair-feedback.d.ts.map +1 -0
  50. package/lib/repair-feedback.js +79 -0
  51. package/lib/repair-feedback.js.map +1 -0
  52. package/lib/repair-profile.d.ts +27 -0
  53. package/lib/repair-profile.d.ts.map +1 -0
  54. package/lib/repair-profile.js +51 -0
  55. package/lib/repair-profile.js.map +1 -0
  56. package/lib/repair-runtime.d.ts +35 -0
  57. package/lib/repair-runtime.d.ts.map +1 -0
  58. package/lib/repair-runtime.js +181 -0
  59. package/lib/repair-runtime.js.map +1 -0
  60. package/lib/replay.d.ts +38 -0
  61. package/lib/replay.d.ts.map +1 -0
  62. package/lib/replay.js +240 -0
  63. package/lib/replay.js.map +1 -0
  64. package/lib/sealed-holdout.d.ts +20 -0
  65. package/lib/sealed-holdout.d.ts.map +1 -0
  66. package/lib/sealed-holdout.js +12 -0
  67. package/lib/sealed-holdout.js.map +1 -0
  68. package/lib/service.d.ts +968 -0
  69. package/lib/service.d.ts.map +1 -0
  70. package/lib/service.js +1929 -0
  71. package/lib/service.js.map +1 -0
  72. package/lib/store.d.ts +366 -0
  73. package/lib/store.d.ts.map +1 -0
  74. package/lib/store.js +1517 -0
  75. package/lib/store.js.map +1 -0
  76. package/lib/version.d.ts +2 -0
  77. package/lib/version.d.ts.map +1 -0
  78. package/lib/version.js +2 -0
  79. package/lib/version.js.map +1 -0
  80. package/lib/watch-proof.d.ts +30 -0
  81. package/lib/watch-proof.d.ts.map +1 -0
  82. package/lib/watch-proof.js +209 -0
  83. package/lib/watch-proof.js.map +1 -0
  84. package/package.json +141 -0
@@ -0,0 +1,241 @@
1
+ import { createHash } from 'node:crypto';
2
+ import { acceptanceDigest } from '@dsh-enhanced/task-acceptance-contract';
3
+ import { installModelSelection } from '@deepseek-ai/dsh-agent';
4
+ import {} from '@deepseek-ai/dsh-llm';
5
+ import { SessionId } from '@deepseek-ai/dsh-session';
6
+ const validText = (value, max = 4_096) => typeof value === 'string' && value.length > 0 && value.length <= max;
7
+ const validCount = (value, min = 1) => typeof value === 'number' && Number.isSafeInteger(value) && value >= min && value <= 1_000_000_000;
8
+ const sessionIdFor = (authorizationId) => SessionId(`owner-repair-${createHash('sha256').update(authorizationId).digest('hex').slice(0, 40)}`);
9
+ function validate(input) {
10
+ if (!validText(input.id) || !validText(input.authorizationDigest) || !validText(input.ownerRouteId)
11
+ || !validText(input.objective, 16_384) || !validText(input.provider) || !validText(input.model)
12
+ || !validCount(input.maxGoalRounds) || !validCount(input.maxModelCalls) || !validCount(input.maxToolCalls, 0)
13
+ || !validCount(input.maxOutputTokens) || !validCount(input.maxDurationMs) || !Number.isSafeInteger(input.expiresAt)
14
+ || input.expiresAt <= Date.now() || typeof input.assertCurrent !== 'function'
15
+ || !Array.isArray(input.allowedTools) || input.allowedTools.length > 256 || input.allowedTools.some(tool => !validText(tool, 256))
16
+ || input.iteration !== undefined && (!validCount(input.iteration) || input.iteration > 4)
17
+ || input.initialModelCalls !== undefined && (!validCount(input.initialModelCalls, 0) || input.initialModelCalls > input.maxModelCalls)
18
+ || input.initialToolCalls !== undefined && (!validCount(input.initialToolCalls, 0) || input.initialToolCalls > input.maxToolCalls)
19
+ || input.recordUsage !== undefined && typeof input.recordUsage !== 'function'
20
+ || new Set(input.allowedTools).size !== input.allowedTools.length)
21
+ throw new Error('assistant-skills: invalid owner repair Agent input');
22
+ }
23
+ /**
24
+ * Owns short-lived Agents for already-authorized repair Goals. It deliberately
25
+ * does not submit a user message: the mounted native goal-round driver is the
26
+ * only continuation producer after Goals creates the armed native goal.
27
+ */
28
+ export class OwnerRepairAgentRuntime {
29
+ ctx;
30
+ #handles = new Map();
31
+ #attempted = new Set();
32
+ #toolSchemaDigests = new Map();
33
+ #controllers = new Map();
34
+ #authorizationSessions = new Map();
35
+ #inflight = new Map();
36
+ #disposeFlight;
37
+ #disposed = false;
38
+ constructor(ctx) {
39
+ this.ctx = ctx;
40
+ ctx.effect(() => () => this.dispose(), 'assistant-skills.owner-repair-agents');
41
+ }
42
+ get(sessionId) { return this.#handles.get(sessionId)?.agent; }
43
+ async create(input, signal) {
44
+ if (this.#disposed)
45
+ throw new Error('assistant-skills: owner repair Agent runtime disposed');
46
+ validate(input);
47
+ input.assertCurrent();
48
+ const sessionId = sessionIdFor(`${input.id}:${input.iteration ?? 1}`);
49
+ const key = String(sessionId);
50
+ if (this.#attempted.has(key))
51
+ throw new Error('assistant-skills: owner repair Agent creation is not retry-safe');
52
+ this.#attempted.add(key);
53
+ const sessions = this.#authorizationSessions.get(input.id) ?? new Set();
54
+ sessions.add(key);
55
+ this.#authorizationSessions.set(input.id, sessions);
56
+ const creation = this.#create(sessionId, key, input, signal);
57
+ this.#inflight.set(key, creation);
58
+ try {
59
+ return await creation;
60
+ }
61
+ finally {
62
+ this.#inflight.delete(key);
63
+ }
64
+ }
65
+ async #create(sessionId, key, input, signal) {
66
+ const deadline = new AbortController();
67
+ this.#controllers.set(key, deadline);
68
+ const timer = setTimeout(() => deadline.abort(new Error('assistant-skills: owner repair Agent deadline exceeded')), Math.min(input.maxDurationMs, input.expiresAt - Date.now()));
69
+ timer.unref?.();
70
+ const combined = signal === undefined ? deadline.signal : AbortSignal.any([signal, deadline.signal]);
71
+ let handle;
72
+ let retained = false;
73
+ try {
74
+ const agents = this.ctx.get('agents');
75
+ const goals = this.ctx.get('assistantGoals', false);
76
+ const policy = this.ctx.get('assistantPolicy', false);
77
+ if (agents === undefined || goals === undefined || policy === undefined)
78
+ throw new Error('assistant-skills: repair Agent dependencies unavailable');
79
+ handle = await agents.create({ sessionId, meta: { cwd: input.scope.workspace, agentPreset: input.scope.preset },
80
+ agentOptions: { provider: input.provider, model: input.model, maxTokens: input.maxOutputTokens }, signal: combined,
81
+ setup: async (agentCtx) => {
82
+ const agent = agentCtx.agent;
83
+ if (agent === undefined)
84
+ throw new Error('assistant-skills: unpublished repair Agent is unavailable');
85
+ input.assertCurrent();
86
+ combined.throwIfAborted();
87
+ // Establish background authority and cancellation before mounting preset effects.
88
+ this.#setupRepairAgent(agentCtx, agent, input, combined, timer);
89
+ const presets = this.ctx.get('agentPresets', false);
90
+ if (presets !== undefined) {
91
+ const preset = await presets.resolve(input.scope.preset);
92
+ input.assertCurrent();
93
+ combined.throwIfAborted();
94
+ if (preset.id !== input.scope.preset)
95
+ throw new Error('assistant-skills: repair preset changed');
96
+ await presets.mount(agentCtx, preset.id);
97
+ }
98
+ input.assertCurrent();
99
+ combined.throwIfAborted();
100
+ this.#checkRepairTools(agentCtx, agent, input);
101
+ },
102
+ });
103
+ input.assertCurrent();
104
+ combined.throwIfAborted();
105
+ this.#handles.set(key, handle);
106
+ const repair = { authorizationId: input.id, authorizationDigest: input.authorizationDigest,
107
+ ownerRouteId: input.ownerRouteId, scope: input.scope, trigger: input.trigger, objective: input.objective,
108
+ maxGoalRounds: input.maxGoalRounds, expiresAt: input.expiresAt };
109
+ const currentGoals = this.ctx.get('assistantGoals', false);
110
+ if (currentGoals === undefined)
111
+ throw new Error('assistant-skills: repair Goals service changed');
112
+ const record = await currentGoals.startOwnerAuthorizedRepair(handle.agent, repair, input.assertCurrent);
113
+ retained = true;
114
+ return { sessionId: key, goalId: record.id };
115
+ }
116
+ catch (error) {
117
+ deadline.abort(new Error('assistant-skills: repair Agent creation failed'));
118
+ this.#handles.delete(key);
119
+ this.#toolSchemaDigests.delete(key);
120
+ if (handle !== undefined)
121
+ await handle.dispose();
122
+ throw error;
123
+ }
124
+ finally {
125
+ if (!retained) {
126
+ this.#controllers.delete(key);
127
+ clearTimeout(timer);
128
+ }
129
+ }
130
+ }
131
+ #checkRepairTools(agentCtx, agent, input) {
132
+ const allowed = new Set(input.allowedTools);
133
+ const globalNames = agentCtx.tools.schemas().map(schema => schema.name);
134
+ const mountedNames = agentCtx.tools.schemas(agent).map(schema => schema.name);
135
+ for (const name of allowed) {
136
+ if (!mountedNames.includes(name))
137
+ throw new Error(`assistant-skills: unknown repair allowlist tool: ${name}`);
138
+ }
139
+ const denied = globalNames.filter(name => !allowed.has(name));
140
+ if (denied.length > 0)
141
+ agentCtx.tools.restrict({ deny: denied });
142
+ this.#toolSchemaDigests.set(String(agent.session.id), acceptanceDigest(agentCtx.tools.schemas(agent).filter(tool => allowed.has(tool.name)).sort((a, b) => a.name.localeCompare(b.name))));
143
+ // Pinned DSH restrict() masks globals only. Preset-local registrations stay
144
+ // in their owning scope; model presentation and the monotonic execution
145
+ // guard below enforce the frozen allowlist for both kinds of tool.
146
+ }
147
+ #setupRepairAgent(agentCtx, agent, input, combined, timer) {
148
+ const policy = this.ctx.get('assistantPolicy', false);
149
+ if (policy === undefined)
150
+ throw new Error('assistant-skills: repair policy changed');
151
+ agentCtx.effect(() => policy.bindInitiator(agent, 'background', input.scope.principalId), 'assistant-skills.owner-repair-initiator');
152
+ agentCtx.effect(() => installModelSelection(agentCtx, { current: { provider: input.provider, model: input.model }, assembled: undefined }), 'assistant-skills.owner-repair-model');
153
+ const allowed = new Set(input.allowedTools);
154
+ const schemaDigests = this.#toolSchemaDigests;
155
+ agentCtx.on('system-prompt/assemble', async (_assembly, context, next) => {
156
+ const assembly = await next();
157
+ if (context.agent !== agent)
158
+ return assembly;
159
+ return { ...assembly, tools: assembly.tools.filter(tool => allowed.has(tool.name)).sort((a, b) => a.name.localeCompare(b.name)) };
160
+ });
161
+ let calls = input.initialModelCalls ?? 0;
162
+ let toolCalls = input.initialToolCalls ?? 0;
163
+ agentCtx.on('llm/stream', async function* (options, next) {
164
+ // Cordis service event filtering follows service realms, not Agent identity.
165
+ // The native loop stamps this immutable Session id on every request.
166
+ if (options.sessionId !== agent.session.id) {
167
+ yield* next();
168
+ return;
169
+ }
170
+ input.assertCurrent();
171
+ combined.throwIfAborted();
172
+ if (options.provider !== input.provider || options.model !== input.model || options.maxTokens === undefined || options.maxTokens > input.maxOutputTokens || acceptanceDigest(options.tools ?? []) !== schemaDigests.get(String(agent.session.id)) || calls++ >= input.maxModelCalls) {
173
+ agent.cancel({ kind: 'hook', reason: 'assistant-skills-owner-repair-model-limit' });
174
+ throw new Error('assistant-skills: owner repair model request rejected');
175
+ }
176
+ input.recordUsage?.('model');
177
+ for await (const chunk of next()) {
178
+ combined.throwIfAborted();
179
+ yield chunk;
180
+ }
181
+ });
182
+ agentCtx.tools.guard(execution => {
183
+ input.assertCurrent();
184
+ combined.throwIfAborted();
185
+ if (!allowed.has(execution.name) || toolCalls >= input.maxToolCalls) {
186
+ agent.cancel({ kind: 'hook', reason: 'assistant-skills-owner-repair-tool-limit' });
187
+ return 'assistant-skills: owner repair tool request rejected';
188
+ }
189
+ toolCalls += 1;
190
+ input.recordUsage?.('tool');
191
+ return undefined;
192
+ });
193
+ const abort = () => agent.cancel({ kind: 'hook', reason: 'assistant-skills-owner-repair-expired' });
194
+ combined.addEventListener('abort', abort, { once: true });
195
+ agentCtx.effect(() => () => { clearTimeout(timer); combined.removeEventListener('abort', abort); }, 'assistant-skills.owner-repair-deadline');
196
+ }
197
+ async closeSession(sessionId) {
198
+ this.#controllers.get(sessionId)?.abort(new Error('assistant-skills: repair Agent closed'));
199
+ const creation = this.#inflight.get(sessionId);
200
+ if (creation !== undefined)
201
+ await creation.catch(() => undefined);
202
+ const handle = this.#handles.get(sessionId);
203
+ if (handle === undefined) {
204
+ this.#controllers.delete(sessionId);
205
+ this.#toolSchemaDigests.delete(sessionId);
206
+ return;
207
+ }
208
+ this.#handles.delete(sessionId);
209
+ this.#controllers.delete(sessionId);
210
+ await handle.dispose();
211
+ this.#toolSchemaDigests.delete(sessionId);
212
+ }
213
+ async closeAuthorization(authorizationId) {
214
+ if (!validText(authorizationId))
215
+ throw new Error('assistant-skills: invalid owner repair authorization id');
216
+ await Promise.all([...this.#authorizationSessions.get(authorizationId) ?? []].map(sessionId => this.closeSession(sessionId)));
217
+ this.#authorizationSessions.delete(authorizationId);
218
+ }
219
+ async dispose() {
220
+ return this.#disposeFlight ??= this.#dispose();
221
+ }
222
+ async #dispose() {
223
+ this.#disposed = true;
224
+ for (const controller of this.#controllers.values())
225
+ controller.abort(new Error('assistant-skills: repair runtime disposed'));
226
+ const creations = [...this.#inflight.values()];
227
+ // A creation rejected because this disposer revoked its signal is already
228
+ // observable by its caller. It has no published handle to dispose here.
229
+ await Promise.allSettled(creations);
230
+ this.#controllers.clear();
231
+ this.#toolSchemaDigests.clear();
232
+ this.#authorizationSessions.clear();
233
+ const handles = [...this.#handles.entries()];
234
+ this.#handles.clear();
235
+ const disposalResults = await Promise.allSettled(handles.map(([, handle]) => handle.dispose()));
236
+ const errors = disposalResults.flatMap(result => result.status === 'rejected' ? [result.reason] : []);
237
+ if (errors.length)
238
+ throw new AggregateError(errors, 'assistant-skills: repair Agent disposal failed');
239
+ }
240
+ }
241
+ //# sourceMappingURL=repair-agent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"repair-agent.js","sourceRoot":"","sources":["../src/repair-agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAA;AAEzE,OAAO,EAAE,qBAAqB,EAAgC,MAAM,wBAAwB,CAAA;AAC5F,OAAO,EAA0C,MAAM,sBAAsB,CAAA;AAC7E,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AA+BpD,MAAM,SAAS,GAAG,CAAC,KAAc,EAAE,GAAG,GAAG,KAAK,EAAmB,EAAE,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,KAAK,CAAC,MAAM,IAAI,GAAG,CAAA;AACxI,MAAM,UAAU,GAAG,CAAC,KAAc,EAAE,GAAG,GAAG,CAAC,EAAmB,EAAE,CAAC,OAAO,KAA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AAE,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,CAAA;QAC/F,MAAM,MAAM,GAAG,eAAe,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,MAAM,KAAK,UAAU,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAA;QACrG,IAAI,MAAM,CAAC,MAAM;YAAE,MAAM,IAAI,cAAc,CAAC,MAAM,EAAE,gDAAgD,CAAC,CAAA;IACvG,CAAC;CACF"}
@@ -0,0 +1,70 @@
1
+ /** Frozen at repair arm time; it never grants a new notification window. */
2
+ export interface RepairFeedbackAuthority {
3
+ sessionId: string;
4
+ expiresAt: number;
5
+ routeReceipt: unknown;
6
+ }
7
+ export interface RepairFeedbackScope {
8
+ principalId: string;
9
+ principalRecordId: string;
10
+ principalVersion: number;
11
+ workspace: string;
12
+ preset: string;
13
+ }
14
+ export interface RepairFeedbackRecord {
15
+ id: string;
16
+ scope: RepairFeedbackScope;
17
+ authorization: {
18
+ ownerRouteId: string;
19
+ };
20
+ routeReceipt: unknown;
21
+ feedbackAuthority: RepairFeedbackAuthority;
22
+ }
23
+ /**
24
+ * Callers provide only durable repair facts. Text deliberately excludes
25
+ * source prompts, model output, paths, and identifiers from the repair work.
26
+ */
27
+ export type RepairFeedbackMilestone = 'independent-acceptance' | 'candidate-staged' | 'finite-canary' | 'iteration-success' | 'final-success' | 'successor-failed' | 'interrupted' | 'budget-exhausted';
28
+ export interface RepairIterationOutcome {
29
+ iteration: number;
30
+ maxIterations: number;
31
+ state: string;
32
+ milestone: RepairFeedbackMilestone;
33
+ candidateId?: string;
34
+ deploymentId?: string;
35
+ goalId?: string;
36
+ }
37
+ export interface RepairFeedbackDelivery {
38
+ validateOwnerRoute(input: {
39
+ authorityId: string;
40
+ principalId: string;
41
+ workspace: string;
42
+ agentPreset: string;
43
+ }): unknown;
44
+ enqueueOwnerNotification(input: {
45
+ sourceId: string;
46
+ ownerRouteId: string;
47
+ scope: RepairFeedbackScope;
48
+ sessionId: string;
49
+ idempotencyKey: string;
50
+ text: string;
51
+ expiresAt: number;
52
+ }): unknown;
53
+ }
54
+ export type RepairFeedbackResult = {
55
+ outcome: 'queued';
56
+ idempotencyKey: string;
57
+ text: string;
58
+ } | {
59
+ outcome: 'not-queued';
60
+ reason: 'expired' | 'route-not-current' | 'delivery-rejected';
61
+ };
62
+ /** Deterministic, private status text. It never says the original goal is complete or that a person read it. */
63
+ export declare function renderRepairFeedback(outcome: RepairIterationOutcome): string;
64
+ export declare function repairFeedbackIdempotencyKey(record: Pick<RepairFeedbackRecord, 'id'>, outcome: Pick<RepairIterationOutcome, 'iteration' | 'milestone'>): string;
65
+ /**
66
+ * Queue one already-authorized owner notice. Delivery owns the final send-Policy
67
+ * check; route, lineage, receipt, session, and expiry are fenced before queueing.
68
+ */
69
+ export declare function enqueueRepairFeedback(delivery: RepairFeedbackDelivery, record: RepairFeedbackRecord, outcome: RepairIterationOutcome): RepairFeedbackResult;
70
+ //# sourceMappingURL=repair-feedback.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"repair-feedback.d.ts","sourceRoot":"","sources":["../src/repair-feedback.ts"],"names":[],"mappings":"AAEA,4EAA4E;AAC5E,MAAM,WAAW,uBAAuB;IACtC,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,YAAY,EAAE,OAAO,CAAA;CACtB;AAED,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,MAAM,CAAA;IACnB,iBAAiB,EAAE,MAAM,CAAA;IACzB,gBAAgB,EAAE,MAAM,CAAA;IACxB,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,mBAAmB,CAAA;IAC1B,aAAa,EAAE;QAAE,YAAY,EAAE,MAA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F,gHAAgH;AAChH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,sBAAsB,GAAG,MAAM,CAM5E;AAED,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,IAAI,CAAC,oBAAoB,EAAE,IAAI,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,sBAAsB,EAAE,WAAW,GAAG,WAAW,CAAC,GAAG,MAAM,CAG/J;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,sBAAsB,EAAE,MAAM,EAAE,oBAAoB,EAAE,OAAO,EAAE,sBAAsB,GAAG,oBAAoB,CAkB3J"}
@@ -0,0 +1,79 @@
1
+ import { acceptanceDigest } from '@dsh-enhanced/task-acceptance-contract';
2
+ const sourceId = 'dsh-enhanced-assistant-skills';
3
+ const milestones = {
4
+ 'independent-acceptance': 'The repair result received independent acceptance.',
5
+ 'candidate-staged': 'An independently accepted repair candidate was staged.',
6
+ 'finite-canary': 'The staged candidate entered its finite canary evaluation.',
7
+ 'iteration-success': 'The repair iteration completed its independently accepted finite-canary path.',
8
+ 'final-success': 'The finite repair sequence ended with an independently accepted successor after its finite canary path.',
9
+ 'successor-failed': 'The proposed successor did not pass the finite repair sequence.',
10
+ interrupted: 'The repair sequence stopped after an interruption; its result is unknown.',
11
+ 'budget-exhausted': 'The finite repair budget ended without another authorized successor.',
12
+ };
13
+ function validText(value, max = 512) {
14
+ return typeof value === 'string' && value.length > 0 && value.length <= max;
15
+ }
16
+ function validPositive(value) {
17
+ return typeof value === 'number' && Number.isSafeInteger(value) && value > 0;
18
+ }
19
+ function validScope(scope) {
20
+ return validText(scope.principalId, 1_024) && validText(scope.principalRecordId, 1_024)
21
+ && validPositive(scope.principalVersion) && validText(scope.workspace, 4_096) && validText(scope.preset, 200);
22
+ }
23
+ function validRecord(record) {
24
+ return validText(record.id, 512) && validText(record.authorization.ownerRouteId, 512) && validScope(record.scope)
25
+ && validText(record.feedbackAuthority.sessionId, 512) && Number.isSafeInteger(record.feedbackAuthority.expiresAt)
26
+ && record.feedbackAuthority.routeReceipt !== undefined && record.routeReceipt !== undefined;
27
+ }
28
+ function validOutcome(outcome) {
29
+ return validPositive(outcome.iteration) && validPositive(outcome.maxIterations) && outcome.iteration <= outcome.maxIterations
30
+ && validText(outcome.state, 128) && Object.hasOwn(milestones, outcome.milestone);
31
+ }
32
+ /** Deterministic, private status text. It never says the original goal is complete or that a person read it. */
33
+ export function renderRepairFeedback(outcome) {
34
+ if (!validOutcome(outcome))
35
+ throw new Error('assistant-skills: invalid repair feedback outcome');
36
+ const round = `Repair iteration ${outcome.iteration} of ${outcome.maxIterations}.`;
37
+ const terminal = outcome.milestone === 'final-success' || outcome.milestone === 'successor-failed'
38
+ || outcome.milestone === 'interrupted' || outcome.milestone === 'budget-exhausted';
39
+ return `${round} ${milestones[outcome.milestone]}${terminal ? ' This update reports the bounded repair sequence only; it does not establish that the original objective is complete or that this notice was read.' : ''}`;
40
+ }
41
+ export function repairFeedbackIdempotencyKey(record, outcome) {
42
+ if (!validText(record.id, 512) || !validPositive(outcome.iteration) || !Object.hasOwn(milestones, outcome.milestone))
43
+ throw new Error('assistant-skills: invalid repair feedback idempotency input');
44
+ return `repair-feedback:${record.id}:${outcome.iteration}:${outcome.milestone}`;
45
+ }
46
+ /**
47
+ * Queue one already-authorized owner notice. Delivery owns the final send-Policy
48
+ * check; route, lineage, receipt, session, and expiry are fenced before queueing.
49
+ */
50
+ export function enqueueRepairFeedback(delivery, record, outcome) {
51
+ if (!validRecord(record) || !validOutcome(outcome))
52
+ throw new Error('assistant-skills: invalid repair feedback input');
53
+ if (Date.now() >= record.feedbackAuthority.expiresAt)
54
+ return { outcome: 'not-queued', reason: 'expired' };
55
+ // The arm-time receipt and the record receipt must describe the same exact route.
56
+ if (acceptanceDigest(record.routeReceipt) !== acceptanceDigest(record.feedbackAuthority.routeReceipt))
57
+ return { outcome: 'not-queued', reason: 'route-not-current' };
58
+ let receipt;
59
+ try {
60
+ receipt = delivery.validateOwnerRoute({ authorityId: record.authorization.ownerRouteId, principalId: record.scope.principalId,
61
+ workspace: record.scope.workspace, agentPreset: record.scope.preset });
62
+ }
63
+ catch {
64
+ return { outcome: 'not-queued', reason: 'route-not-current' };
65
+ }
66
+ if (acceptanceDigest(receipt) !== acceptanceDigest(record.routeReceipt))
67
+ return { outcome: 'not-queued', reason: 'route-not-current' };
68
+ const idempotencyKey = repairFeedbackIdempotencyKey(record, outcome);
69
+ const text = renderRepairFeedback(outcome);
70
+ try {
71
+ delivery.enqueueOwnerNotification({ sourceId, ownerRouteId: record.authorization.ownerRouteId, scope: record.scope,
72
+ sessionId: record.feedbackAuthority.sessionId, idempotencyKey, text, expiresAt: record.feedbackAuthority.expiresAt });
73
+ }
74
+ catch {
75
+ return { outcome: 'not-queued', reason: 'delivery-rejected' };
76
+ }
77
+ return { outcome: 'queued', idempotencyKey, text };
78
+ }
79
+ //# sourceMappingURL=repair-feedback.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"repair-feedback.js","sourceRoot":"","sources":["../src/repair-feedback.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAA;AAkEzE,MAAM,QAAQ,GAAG,+BAA+B,CAAA;AAChD,MAAM,UAAU,GAAsD;IACpE,wBAAwB,EAAE,oDAAoD;IAC9E,kBAAkB,EAAE,wDAAwD;IAC5E,eAAe,EAAE,4DAA4D;IAC7E,mBAAmB,EAAE,+EAA+E;IACpG,eAAe,EAAE,yGAAyG;IAC1H,kBAAkB,EAAE,iEAAiE;IACrF,WAAW,EAAE,2EAA2E;IACxF,kBAAkB,EAAE,sEAAsE;CAC3F,CAAA;AAED,SAAS,SAAS,CAAC,KAAc,EAAE,GAAG,GAAG,GAAG;IAC1C,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,KAAK,CAAC,MAAM,IAAI,GAAG,CAAA;AAC7E,CAAC;AAED,SAAS,aAAa,CAA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AE,CAAC,CAAA;IACzH,CAAC;IAAC,MAAM,CAAC;QAAC,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,mBAAmB,EAAE,CAAA;IAAC,CAAC;IACzE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,IAAI,EAAE,CAAA;AACpD,CAAC"}
@@ -0,0 +1,27 @@
1
+ import type { GoalScope } from '@dsh-enhanced/assistant-goals';
2
+ import type { ExternalHoldoutProfile } from './external-holdout.js';
3
+ import type { SkillBinding } from './definition.js';
4
+ /** Operator configuration. Owner tools select an id; they cannot supply code or evaluator inputs. */
5
+ export interface RepairContinuationProfile {
6
+ id: string;
7
+ scope: GoalScope;
8
+ skillName: string;
9
+ taskFamilyId: string;
10
+ description: string;
11
+ bindings?: readonly SkillBinding[];
12
+ externalHoldoutProfileId: string;
13
+ provider: string;
14
+ model: string;
15
+ allowedTools: readonly string[];
16
+ maxGoalRounds: number;
17
+ maxModelCalls: number;
18
+ maxToolCalls: number;
19
+ maxOutputTokens: number;
20
+ maxDurationMs: number;
21
+ canaryRuns: number;
22
+ maxCanaryRuns: number;
23
+ maxIterations?: number;
24
+ followupProfileIds?: readonly string[];
25
+ }
26
+ export declare function validateRepairProfiles(values: unknown, holdouts: readonly ExternalHoldoutProfile[]): readonly RepairContinuationProfile[];
27
+ //# sourceMappingURL=repair-profile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"repair-profile.d.ts","sourceRoot":"","sources":["../src/repair-profile.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAA;AAE9D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAA;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAEnD,qGAAqG;AACrG,MAAM,WAAW,yBAAyB;IACxC,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,SAAS,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,YAAY,EAAE,MAAM,CAAA;IACpB,WAAW,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,SAAS,YAAY,EAAE,CAAA;IAClC,wBAAwB,EAAE,MAAM,CAAA;IAChC,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,YAAY,EAAE,SAAS,MAAM,EAAE,CAAA;IAC/B,aAAa,EAAE,MAAM,CAAA;IACrB,aAAa,EAAE,MAAM,CAAA;IACrB,YAAY,EAAE,MAAM,CAAA;IACpB,eAAe,EAAE,MAAM,CAAA;IACvB,aAAa,EAAE,MAAM,CAAA;IACrB,UAAU,EAAE,MAAM,CAAA;IAClB,aAAa,EAAE,MAAM,CAAA;IACrB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,kBAAkB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CACvC;AAQD,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,sBAAsB,EAAE,GAAG,SAAS,yBAAyB,EAAE,CAkCzI"}
@@ -0,0 +1,51 @@
1
+ import { isAbsolute } from 'node:path';
2
+ import { acceptanceDigest } from '@dsh-enhanced/task-acceptance-contract';
3
+ const plain = (value) => value !== null && typeof value === 'object'
4
+ && !Array.isArray(value) && Object.getPrototypeOf(value) === Object.prototype && Object.getOwnPropertySymbols(value).length === 0
5
+ && Object.values(Object.getOwnPropertyDescriptors(value)).every(item => item.enumerable && 'value' in item);
6
+ const bounded = (value, max) => typeof value === 'string' && value.length > 0 && value.length <= max && !value.includes('\0');
7
+ const integer = (value, min, max) => Number.isSafeInteger(value) && Number(value) >= min && Number(value) <= max;
8
+ export function validateRepairProfiles(values, holdouts) {
9
+ if (!Array.isArray(values) || values.length > 32)
10
+ throw new Error('assistant-skills: invalid repair profiles');
11
+ const allowed = ['id', 'scope', 'skillName', 'taskFamilyId', 'description', 'bindings', 'externalHoldoutProfileId', 'provider', 'model', 'allowedTools', 'maxGoalRounds', 'maxModelCalls', 'maxToolCalls', 'maxOutputTokens', 'maxDurationMs', 'canaryRuns', 'maxCanaryRuns', 'maxIterations', 'followupProfileIds'];
12
+ const profiles = values.map((value) => {
13
+ if (!plain(value) || Object.keys(value).some(key => !allowed.includes(key)) || !plain(value.scope)
14
+ || Object.keys(value.scope).sort().join(',') !== 'preset,principalId,principalRecordId,principalVersion,workspace'
15
+ || !bounded(value.scope.principalId, 4096) || !bounded(value.scope.principalRecordId, 4096) || !integer(value.scope.principalVersion, 1, Number.MAX_SAFE_INTEGER)
16
+ || !bounded(value.scope.workspace, 4096) || !isAbsolute(value.scope.workspace) || !bounded(value.scope.preset, 4096)
17
+ || !bounded(value.id, 128) || !bounded(value.taskFamilyId, 128) || !bounded(value.description, 4096)
18
+ || !bounded(value.skillName, 64) || !/^[a-z](?:[a-z0-9-]{0,62}[a-z0-9])?$/u.test(value.skillName)
19
+ || !bounded(value.provider, 256) || !bounded(value.model, 256) || !bounded(value.externalHoldoutProfileId, 128)
20
+ || !Array.isArray(value.allowedTools) || value.allowedTools.length < 1 || value.allowedTools.length > 32
21
+ || value.allowedTools.some(tool => !bounded(tool, 128) || !/^[a-zA-Z][a-zA-Z0-9_-]*$/u.test(tool))
22
+ || new Set(value.allowedTools).size !== value.allowedTools.length
23
+ || !integer(value.maxGoalRounds, 1, 32) || !integer(value.maxModelCalls, 1, 128) || !integer(value.maxToolCalls, 1, 512)
24
+ || !integer(value.maxOutputTokens, 1, 65536) || !integer(value.maxDurationMs, 1000, 300000)
25
+ || !integer(value.canaryRuns, 1, 32) || !integer(value.maxCanaryRuns, Number(value.canaryRuns), 100)
26
+ || value.maxIterations !== undefined && !integer(value.maxIterations, 1, 4)
27
+ || value.followupProfileIds !== undefined && (!Array.isArray(value.followupProfileIds) || value.followupProfileIds.length > (Number(value.maxIterations ?? 1) - 1)
28
+ || value.followupProfileIds.some(id => !bounded(id, 128)) || new Set(value.followupProfileIds).size !== value.followupProfileIds.length))
29
+ throw new Error('assistant-skills: invalid repair profile');
30
+ // The repair model cannot mint goals, authorize continuations, or promote itself.
31
+ if (value.allowedTools.some(tool => /^(?:skill_|goal_create$|goal_control$|set_goal$|update_goal$)/u.test(tool)))
32
+ throw new Error('assistant-skills: repair tool authority exceeds fixed scope');
33
+ if (value.bindings !== undefined && (!Array.isArray(value.bindings) || value.bindings.length > 32 || value.bindings.some(binding => !plain(binding)
34
+ || Object.keys(binding).sort().join(',') !== 'name,path,stepId' || !bounded(binding.name, 128) || !bounded(binding.stepId, 128) || !bounded(binding.path, 1024))))
35
+ throw new Error('assistant-skills: invalid repair bindings');
36
+ const holdout = holdouts.find(item => item.id === value.externalHoldoutProfileId && acceptanceDigest(item.scope) === acceptanceDigest(value.scope));
37
+ if (!holdout?.authority.generatorDigest || !holdout.canaryAdmissionTemplate || holdout.canaryAdmissionTemplate.skillName !== value.skillName)
38
+ throw new Error('assistant-skills: repair requires a scoped prospective holdout template');
39
+ return { ...structuredClone(value), maxIterations: value.maxIterations ?? 1 };
40
+ });
41
+ if (new Set(profiles.map(value => acceptanceDigest([value.scope, value.id]))).size !== profiles.length)
42
+ throw new Error('assistant-skills: duplicate repair profile');
43
+ for (const profile of profiles)
44
+ for (const id of profile.followupProfileIds ?? []) {
45
+ const next = profiles.find(value => value.id === id && acceptanceDigest(value.scope) === acceptanceDigest(profile.scope));
46
+ if (!next || next.id === profile.id)
47
+ throw new Error('assistant-skills: invalid repair followup profile');
48
+ }
49
+ return Object.freeze(profiles.map(value => Object.freeze(value)));
50
+ }
51
+ //# sourceMappingURL=repair-profile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"repair-profile.js","sourceRoot":"","sources":["../src/repair-profile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AAEtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAA;AA2BzE,MAAM,KAAK,GAAG,CAAC,KAAc,EA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AC,IAAI,IAAI,IAAI,CAAC,EAAE,KAAK,OAAO,CAAC,EAAE;gBAAE,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAA;QAC3G,CAAC;IACD,OAAO,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;AACnE,CAAC"}
@@ -0,0 +1,35 @@
1
+ import type { SkillRepairContinuation, SkillRepairNextIterationInput } from './store.js';
2
+ import { SkillStore } from './store.js';
3
+ export interface RepairRuntimePorts {
4
+ inspectTrigger(record: SkillRepairContinuation, signal: AbortSignal): Promise<unknown | undefined>;
5
+ createRepair(record: SkillRepairContinuation, evidence: unknown, signal: AbortSignal): Promise<{
6
+ sessionId: string;
7
+ goalId: string;
8
+ }>;
9
+ inspectRepair(record: SkillRepairContinuation, signal: AbortSignal): Promise<'running' | 'achieved' | 'rejected'>;
10
+ capture(record: SkillRepairContinuation, signal: AbortSignal): Promise<{
11
+ candidateId: string;
12
+ }>;
13
+ compare(record: SkillRepairContinuation, signal: AbortSignal): Promise<{
14
+ deploymentId: string;
15
+ }>;
16
+ inspectDeployment(record: SkillRepairContinuation, signal: AbortSignal): Promise<'watching' | 'complete' | 'rejected'>;
17
+ inspectNextIteration?(record: SkillRepairContinuation, signal: AbortSignal): Promise<SkillRepairNextIterationInput | undefined>;
18
+ assertNextIteration?(record: SkillRepairContinuation, input: SkillRepairNextIterationInput): void;
19
+ assertCurrent(record: SkillRepairContinuation): void;
20
+ }
21
+ /**
22
+ * Host-owned finite continuation driver. A successor iteration requires a
23
+ * validated new source and the frozen profile sequence before Store advances it.
24
+ */
25
+ export declare class RepairContinuationRuntime {
26
+ #private;
27
+ readonly store: SkillStore;
28
+ readonly ports: RepairRuntimePorts;
29
+ constructor(store: SkillStore, ports: RepairRuntimePorts);
30
+ recover(scope: object, id: string): SkillRepairContinuation | undefined;
31
+ tick(scope: object, id: string): Promise<SkillRepairContinuation>;
32
+ tickAll(): Promise<readonly SkillRepairContinuation[]>;
33
+ dispose(): Promise<void>;
34
+ }
35
+ //# sourceMappingURL=repair-runtime.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"repair-runtime.d.ts","sourceRoot":"","sources":["../src/repair-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,6BAA6B,EAAoB,MAAM,YAAY,CAAA;AAC1G,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAEvC,MAAM,WAAW,kBAAkB;IACjC,cAAc,CAAC,MAAM,EAAE,uBAAuB,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,OAAO,GAAG,SAAS,CAAC,CAAA;IAClG,YAAY,CAAC,MAAM,EAAE,uBAAuB,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IACrI,aAAa,CAAC,MAAM,EAAE,uBAAuB,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,SAAS,GAAG,UAAU,GAAG,UAAU,CAAC,CAAA;IACjH,OAAO,CAAC,MAAM,EAAE,uBAAuB,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC;QAAE,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IAC/F,OAAO,CAAC,MAAM,EAAE,uBAAuB,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC;QAAE,YAAY,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IAChG,iBAAiB,CAAC,MAAM,EAAE,uBAAuB,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,GAAG,UAAU,GAAG,UAAU,CAAC,CAAA;IACtH,oBAAoB,CAAC,CAAC,MAAM,EAAE,uBAAuB,EAAE,MAAM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