self-evolving-workflow 0.0.0-stage → 0.1.3

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 (173) hide show
  1. package/LICENSE +27 -0
  2. package/README.md +90 -2
  3. package/dist/agent-memory-prompts.d.ts +13 -0
  4. package/dist/agent-memory-prompts.js +55 -0
  5. package/dist/cli.d.ts +2 -0
  6. package/dist/cli.js +6 -0
  7. package/dist/closeout.d.ts +105 -0
  8. package/dist/closeout.js +479 -0
  9. package/dist/code.d.ts +39 -0
  10. package/dist/code.js +124 -0
  11. package/dist/common.d.ts +9 -0
  12. package/dist/common.js +42 -0
  13. package/dist/context-envelope.d.ts +59 -0
  14. package/dist/context-envelope.js +23 -0
  15. package/dist/host-adapters.d.ts +34 -0
  16. package/dist/host-adapters.js +151 -0
  17. package/dist/http.d.ts +3 -0
  18. package/dist/http.js +90 -0
  19. package/dist/index.d.ts +16 -0
  20. package/dist/index.js +13 -0
  21. package/dist/knowledge-cli.d.ts +183 -0
  22. package/dist/knowledge-cli.js +654 -0
  23. package/dist/knowledge-reads.d.ts +71 -0
  24. package/dist/knowledge-reads.js +193 -0
  25. package/dist/memory.d.ts +97 -0
  26. package/dist/memory.js +250 -0
  27. package/dist/retrospective.d.ts +57 -0
  28. package/dist/retrospective.js +248 -0
  29. package/dist/search.d.ts +36 -0
  30. package/dist/search.js +112 -0
  31. package/dist/skill-addition.d.ts +25 -0
  32. package/dist/skill-addition.js +89 -0
  33. package/dist/skill-design.d.ts +96 -0
  34. package/dist/skill-design.js +226 -0
  35. package/dist/skill-replay.d.ts +55 -0
  36. package/dist/skill-replay.js +451 -0
  37. package/dist/skill-route.d.ts +30 -0
  38. package/dist/skill-route.js +75 -0
  39. package/dist/transcript-evidence.d.ts +3 -0
  40. package/dist/transcript-evidence.js +58 -0
  41. package/dist/upstream/chunker.d.ts +24 -0
  42. package/dist/upstream/chunker.js +96 -0
  43. package/dist/upstream/file-protocol.d.ts +45 -0
  44. package/dist/upstream/file-protocol.js +117 -0
  45. package/dist/upstream/frontmatter.d.ts +47 -0
  46. package/dist/upstream/frontmatter.js +86 -0
  47. package/dist/upstream/graph-search.d.ts +33 -0
  48. package/dist/upstream/graph-search.js +67 -0
  49. package/dist/upstream/l1-extraction.d.ts +26 -0
  50. package/dist/upstream/l1-extraction.js +405 -0
  51. package/dist/upstream/llm.d.ts +8 -0
  52. package/dist/upstream/llm.js +1 -0
  53. package/dist/upstream/merge.d.ts +50 -0
  54. package/dist/upstream/merge.js +153 -0
  55. package/dist/upstream/prompts.d.ts +53 -0
  56. package/dist/upstream/prompts.js +185 -0
  57. package/dist/upstream/search-utils.d.ts +34 -0
  58. package/dist/upstream/search-utils.js +55 -0
  59. package/dist/upstream/slug.d.ts +26 -0
  60. package/dist/upstream/slug.js +103 -0
  61. package/dist/upstream/template.d.ts +29 -0
  62. package/dist/upstream/template.js +80 -0
  63. package/dist/upstream/tokenize.d.ts +4 -0
  64. package/dist/upstream/tokenize.js +29 -0
  65. package/dist/wiki-change.d.ts +76 -0
  66. package/dist/wiki-change.js +299 -0
  67. package/dist/wiki-entry.d.ts +26 -0
  68. package/dist/wiki-entry.js +93 -0
  69. package/dist/wiki-ingest.d.ts +12 -0
  70. package/dist/wiki-ingest.js +126 -0
  71. package/dist/wiki-migration.d.ts +16 -0
  72. package/dist/wiki-migration.js +268 -0
  73. package/dist/wiki-tokens.d.ts +1 -0
  74. package/dist/wiki-tokens.js +46 -0
  75. package/dist/wiki.d.ts +103 -0
  76. package/dist/wiki.js +330 -0
  77. package/dist/workflow-cli.d.ts +2 -0
  78. package/dist/workflow-cli.js +258 -0
  79. package/dist/workflow-install.d.ts +36 -0
  80. package/dist/workflow-install.js +148 -0
  81. package/dist/workflow-knowledge.d.ts +16 -0
  82. package/dist/workflow-knowledge.js +24 -0
  83. package/dist/workflow-mcp.d.ts +2 -0
  84. package/dist/workflow-mcp.js +144 -0
  85. package/dist/workflow-names.d.ts +4 -0
  86. package/dist/workflow-names.js +18 -0
  87. package/dist/workflow-runtime.d.ts +622 -0
  88. package/dist/workflow-runtime.js +627 -0
  89. package/dist/workflow-skills.d.ts +48 -0
  90. package/dist/workflow-skills.js +141 -0
  91. package/package.json +76 -4
  92. package/skills/ew-odyssey/SKILL.md +237 -0
  93. package/skills/ew-odyssey/references/audit-artifacts.md +7 -0
  94. package/skills/ew-odyssey/references/odyssey-base-codex.md +3 -0
  95. package/skills/ew-odyssey/references/odyssey-base.md +278 -0
  96. package/skills/ew-odyssey/references/odyssey-debug.codex.md +305 -0
  97. package/skills/ew-odyssey/references/odyssey-debug.md +283 -0
  98. package/skills/ew-odyssey/references/odyssey-defensive.codex.md +395 -0
  99. package/skills/ew-odyssey/references/odyssey-defensive.md +369 -0
  100. package/skills/ew-odyssey/references/odyssey-improve.codex.md +270 -0
  101. package/skills/ew-odyssey/references/odyssey-improve.md +248 -0
  102. package/skills/ew-odyssey/references/odyssey-planex.codex.md +352 -0
  103. package/skills/ew-odyssey/references/odyssey-planex.md +312 -0
  104. package/skills/ew-odyssey/references/odyssey-review.codex.md +283 -0
  105. package/skills/ew-odyssey/references/odyssey-review.md +251 -0
  106. package/skills/ew-odyssey/references/odyssey-security.md +249 -0
  107. package/skills/ew-odyssey/references/odyssey-ui.codex.md +294 -0
  108. package/skills/ew-odyssey/references/odyssey-ui.md +250 -0
  109. package/skills/ew-odyssey/references/prepare/odyssey-debug.md +105 -0
  110. package/skills/ew-odyssey/references/prepare/odyssey-defensive.md +121 -0
  111. package/skills/ew-odyssey/references/prepare/odyssey-improve.md +93 -0
  112. package/skills/ew-odyssey/references/prepare/odyssey-planex.md +104 -0
  113. package/skills/ew-odyssey/references/prepare/odyssey-review.md +98 -0
  114. package/skills/ew-odyssey/references/prepare/odyssey-security.md +94 -0
  115. package/skills/ew-odyssey/references/prepare/odyssey-ui.md +87 -0
  116. package/skills/ew-orchestrate/SKILL.md +236 -0
  117. package/skills/ew-orchestrate/references/auto-policy.md +165 -0
  118. package/skills/ew-orchestrate/references/companion-route.md +52 -0
  119. package/skills/ew-orchestrate/references/ew-orchestrate.md +27 -0
  120. package/skills/ew-orchestrate/references/goal.md +53 -0
  121. package/skills/ew-orchestrate/references/knowledge-route.md +163 -0
  122. package/skills/ew-orchestrate/references/orchestrator-run-loop.md +36 -0
  123. package/skills/ew-orchestrate/references/planning.md +137 -0
  124. package/skills/ew-orchestrate/steps/ew-analyze/SKILL.md +62 -0
  125. package/skills/ew-orchestrate/steps/ew-analyze/references/boundary-grill.md +50 -0
  126. package/skills/ew-orchestrate/steps/ew-analyze/references/issue-gaps-analyze.md +59 -0
  127. package/skills/ew-orchestrate/steps/ew-analyze/references/prepare.md +42 -0
  128. package/skills/ew-orchestrate/steps/ew-analyze/references/workflow.md +401 -0
  129. package/skills/ew-orchestrate/steps/ew-brainstorm/SKILL.md +32 -0
  130. package/skills/ew-orchestrate/steps/ew-companion/SKILL.md +9 -0
  131. package/skills/ew-orchestrate/steps/ew-execute/SKILL.md +71 -0
  132. package/skills/ew-orchestrate/steps/ew-execute/references/prepare.md +69 -0
  133. package/skills/ew-orchestrate/steps/ew-execute/references/workflow.md +373 -0
  134. package/skills/ew-orchestrate/steps/ew-plan/SKILL.md +102 -0
  135. package/skills/ew-orchestrate/steps/ew-plan/references/boundary-grill.md +50 -0
  136. package/skills/ew-orchestrate/steps/ew-plan/references/prepare.md +51 -0
  137. package/skills/ew-orchestrate/steps/ew-plan/references/tdd.md +53 -0
  138. package/skills/ew-orchestrate/steps/ew-plan/references/workflow.md +278 -0
  139. package/skills/ew-orchestrate/steps/ew-review/SKILL.md +44 -0
  140. package/skills/ew-orchestrate/steps/ew-review/references/odyssey-base-codex.md +3 -0
  141. package/skills/ew-orchestrate/steps/ew-review/references/prepare.md +76 -0
  142. package/skills/ew-orchestrate/steps/ew-review/references/workflow.md +283 -0
  143. package/skills/ew-skill-design/SKILL.md +28 -0
  144. package/skills/ew-skill-design/references/package-contract.md +28 -0
  145. package/skills/ew-skill-design/references/validation.md +7 -0
  146. package/skills/team-swarm/SKILL.md +231 -0
  147. package/skills/team-swarm/references/mcp-coordination.md +10 -0
  148. package/skills/team-swarm/roles/analyst/role.md +181 -0
  149. package/skills/team-swarm/roles/ant/role.md +149 -0
  150. package/skills/team-swarm/roles/coordinator/commands/converge.md +154 -0
  151. package/skills/team-swarm/roles/coordinator/commands/init-swarm.md +134 -0
  152. package/skills/team-swarm/roles/coordinator/commands/iterate.md +202 -0
  153. package/skills/team-swarm/roles/coordinator/role.md +228 -0
  154. package/skills/team-swarm/roles/scorer/role.md +150 -0
  155. package/skills/team-swarm/scripts/aco.py +646 -0
  156. package/skills/team-swarm/scripts/pheromone.py +144 -0
  157. package/skills/team-swarm/scripts/scoring.py +111 -0
  158. package/skills/team-swarm/scripts/test_aco.py +606 -0
  159. package/skills/team-swarm/specs/ant-output-schema.md +127 -0
  160. package/skills/team-swarm/specs/convergence-criteria.md +108 -0
  161. package/skills/team-swarm/specs/pheromone-schema.md +125 -0
  162. package/skills/team-swarm/specs/swarm-config-template.json +71 -0
  163. package/skills/team-swarm/specs/swarm-protocol.md +123 -0
  164. package/skills/workflow-closeout/SKILL.md +10 -0
  165. package/skills/workflow-evolve/SKILL.md +79 -0
  166. package/skills/workflow-evolve/references/agy-gate.md +27 -0
  167. package/skills/workflow-evolve/references/auto-loop.md +20 -0
  168. package/skills/workflow-evolve/references/history-review.md +14 -0
  169. package/skills/workflow-evolve/scripts/codex-memory-replay.mjs +76 -0
  170. package/skills/workflow-evolve/scripts/codex-replay.mjs +1 -0
  171. package/skills/workflow-evolve/scripts/evolve-loop.mjs +259 -0
  172. package/skills/workflow-evolve/scripts/memory-codex-mcp.mjs +124 -0
  173. package/workflows/index.json +23 -0
@@ -0,0 +1,226 @@
1
+ import { execFileSync } from 'node:child_process';
2
+ import { createHash } from 'node:crypto';
3
+ import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
4
+ import { dirname, join, resolve } from 'node:path';
5
+ import { InputError, requireText } from './common.js';
6
+ import { draftSkillAddition } from './skill-addition.js';
7
+ import { changeSkillVersion, replaySkillAddition, replaySkillPackage } from './skill-replay.js';
8
+ export const SKILL_DESIGN_TASK_VERSION = 'skill-design-task/1.0';
9
+ export const SKILL_DESIGN_RECEIPT_VERSION = 'skill-design-receipt/1.0';
10
+ function hash(value) {
11
+ return createHash('sha256').update(value).digest('hex');
12
+ }
13
+ function designRoot(root) {
14
+ return join(resolve(root), '.agent-memory', 'skill-design');
15
+ }
16
+ function taskPath(root, id) {
17
+ if (!/^[a-f0-9]{64}$/.test(id))
18
+ throw new InputError('Expected an exact Skill design task ID');
19
+ return join(designRoot(root), 'tasks', `${id}.json`);
20
+ }
21
+ function receiptPath(root, id) {
22
+ if (!/^[a-f0-9]{64}$/.test(id))
23
+ throw new InputError('Expected an exact Skill design receipt ID');
24
+ return join(designRoot(root), 'receipts', `${id}.json`);
25
+ }
26
+ function object(value, field) {
27
+ if (!value || typeof value !== 'object' || Array.isArray(value))
28
+ throw new InputError(`Invalid ${field}`);
29
+ return value;
30
+ }
31
+ function stringList(value, field) {
32
+ if (!Array.isArray(value) || value.some(item => typeof item !== 'string' || !item.trim())) {
33
+ throw new InputError(`Invalid ${field}`);
34
+ }
35
+ return [...new Set(value.map(item => item.trim()))];
36
+ }
37
+ function writeOnce(path, content) {
38
+ mkdirSync(dirname(path), { recursive: true });
39
+ if (existsSync(path)) {
40
+ if (readFileSync(path, 'utf8') !== content)
41
+ throw new InputError(`Skill design artifact changed: ${path}`);
42
+ return false;
43
+ }
44
+ writeFileSync(path, content, { flag: 'wx' });
45
+ return true;
46
+ }
47
+ function readTask(root, id) {
48
+ const path = taskPath(root, id);
49
+ if (!existsSync(path))
50
+ throw new InputError(`Skill design task not found: ${id}`);
51
+ const task = object(JSON.parse(readFileSync(path, 'utf8')), 'Skill design task');
52
+ if (task.schema_version !== SKILL_DESIGN_TASK_VERSION || task.id !== id || task.route !== 'skill-design') {
53
+ throw new InputError(`Invalid Skill design task: ${id}`);
54
+ }
55
+ return task;
56
+ }
57
+ function readReceipt(root, id) {
58
+ const path = receiptPath(root, id);
59
+ if (!existsSync(path))
60
+ throw new InputError(`Skill design receipt not found: ${id}`);
61
+ const receipt = object(JSON.parse(readFileSync(path, 'utf8')), 'Skill design receipt');
62
+ if (receipt.schema_version !== SKILL_DESIGN_RECEIPT_VERSION || receipt.id !== id ||
63
+ !receipt.design || receipt.design.schema_version !== 'skill-design/1.0') {
64
+ throw new InputError(`Invalid Skill design receipt: ${id}`);
65
+ }
66
+ return receipt;
67
+ }
68
+ function saveReceipt(root, receipt) {
69
+ const path = receiptPath(root, receipt.id);
70
+ writeFileSync(path, JSON.stringify(receipt, null, 2) + '\n');
71
+ }
72
+ export function createSkillDesignTask(root, input) {
73
+ if (input.decision.route !== 'skill-design' || !input.decision.invoke_meta_skill) {
74
+ throw new InputError('Skill design task requires a skill-design route decision');
75
+ }
76
+ const skillId = input.skillId === undefined ? undefined : requireText(input.skillId, 'Skill ID');
77
+ if (skillId && !/^[a-z0-9][a-z0-9-]*$/i.test(skillId))
78
+ throw new InputError('Invalid Skill ID for design task');
79
+ const content = requireText(input.content, 'Skill design candidate content');
80
+ const sources = stringList(input.sources, 'Skill design evidence');
81
+ if (!sources.length)
82
+ throw new InputError('Skill design task requires evidence');
83
+ const taskBase = {
84
+ schema_version: SKILL_DESIGN_TASK_VERSION,
85
+ route: 'skill-design',
86
+ source: {
87
+ closeout_id: requireText(input.closeoutId, 'closeout ID'),
88
+ candidate_id: requireText(input.candidateId, 'candidate ID'),
89
+ evidence: sources,
90
+ content,
91
+ },
92
+ target: {
93
+ ...(skillId ? { skill_id: skillId } : {}),
94
+ ...(input.skillVersion ? { skill_version: requireText(input.skillVersion, 'Skill version') } : {}),
95
+ ...(skillId ? { entry: `skills/${skillId}/SKILL.md` } : {}),
96
+ },
97
+ design_request: {
98
+ reasons: input.decision.reasons,
99
+ instruction: input.decision.meta_skill?.instruction ?? 'Design the smallest Skill package that captures the verified workflow.',
100
+ acceptance: [
101
+ 'Preserve the evidence and target Skill identity.',
102
+ 'Keep the design in a candidate artifact until review passes.',
103
+ 'Return a replayable draft with at least one failing and one passing scenario.',
104
+ 'For a new or contract-changing Skill, return mode package with every new Markdown file in changes.',
105
+ 'Use Markdown links for conditional procedure documents.',
106
+ ],
107
+ },
108
+ };
109
+ const id = hash(JSON.stringify(taskBase));
110
+ const task = { ...taskBase, id, created_at: new Date().toISOString() };
111
+ const path = taskPath(root, id);
112
+ const replayed = !writeOnce(path, JSON.stringify(task, null, 2) + '\n');
113
+ return { id, path, task, replayed };
114
+ }
115
+ export function readSkillDesignTask(root, id) {
116
+ return readTask(root, id);
117
+ }
118
+ export function runSkillDesign(root, taskId, runnerPath) {
119
+ const task = readTask(root, taskId);
120
+ const runner = resolve(requireText(runnerPath, 'design runner'));
121
+ if (!existsSync(runner))
122
+ throw new InputError(`Design runner not found: ${runner}`);
123
+ const output = execFileSync(process.execPath, [runner], {
124
+ cwd: resolve(root), input: JSON.stringify({ task, task_id: task.id, root: resolve(root) }),
125
+ encoding: 'utf8', windowsHide: true, stdio: ['pipe', 'pipe', 'pipe'], timeout: 120_000,
126
+ });
127
+ const design = object(JSON.parse(output), 'Skill design output');
128
+ if (design.schema_version !== 'skill-design/1.0' || design.task_id !== task.id) {
129
+ throw new InputError('Design runner returned an invalid Skill design envelope');
130
+ }
131
+ const draft = object(design.draft, 'Skill design draft');
132
+ const designReceipt = {
133
+ schema_version: SKILL_DESIGN_RECEIPT_VERSION,
134
+ id: hash(JSON.stringify([task.id, design])),
135
+ task_id: task.id,
136
+ status: 'designed',
137
+ runner: { path: runner, sha256: hash(readFileSync(runner)) },
138
+ design: { schema_version: 'skill-design/1.0', task_id: task.id, draft },
139
+ };
140
+ const path = receiptPath(root, designReceipt.id);
141
+ const replayed = !writeOnce(path, JSON.stringify(designReceipt, null, 2) + '\n');
142
+ return { ...designReceipt, path, replayed };
143
+ }
144
+ export function reviewSkillDesign(root, designId) {
145
+ const receipt = readReceipt(root, designId);
146
+ const task = readTask(root, receipt.task_id);
147
+ const draft = receipt.design.draft;
148
+ if (draft.mode === 'package') {
149
+ const skillId = requireText(draft.skill_id, 'Skill package ID');
150
+ const packagePath = `skills/${skillId}`;
151
+ const entry = `${packagePath}/SKILL.md`;
152
+ if (task.target.skill_id !== skillId || task.target.entry !== entry || draft.package_path !== packagePath || draft.entry !== entry) {
153
+ throw new InputError('Skill package target does not match its task');
154
+ }
155
+ if (!Array.isArray(draft.changes) || !draft.changes.length)
156
+ throw new InputError('Skill package design has no files');
157
+ const paths = draft.changes.map((value, index) => {
158
+ const change = object(value, `Skill package file ${index}`);
159
+ const path = requireText(change.path, `Skill package file ${index} path`).replaceAll('\\', '/');
160
+ if (!path.startsWith(`${packagePath}/`) || path.split('/').some(part => !part || part === '.' || part === '..') ||
161
+ typeof change.content !== 'string') {
162
+ throw new InputError(`Invalid Skill package file: ${path}`);
163
+ }
164
+ return path;
165
+ });
166
+ if (new Set(paths).size !== paths.length || !paths.includes(entry)) {
167
+ throw new InputError('Skill package design must contain one unique SKILL.md entry');
168
+ }
169
+ if (!Array.isArray(draft.sources) || !draft.sources.length || draft.sources.some(source => typeof source !== 'string' || !source.trim())) {
170
+ throw new InputError('Skill package design requires evidence sources');
171
+ }
172
+ receipt.status = 'reviewed';
173
+ receipt.review = { status: 'passed', checks: ['package target matches task', 'package files are scoped and unique', 'entry and Markdown links are replayable'] };
174
+ saveReceipt(root, receipt);
175
+ return receipt;
176
+ }
177
+ const baseline = object(draft.baseline, 'Skill design baseline');
178
+ const entry = resolve(requireText(baseline.path, 'Skill design baseline path'));
179
+ if (!task.target.entry || entry.replaceAll('\\', '/') !== resolve(root, task.target.entry).replaceAll('\\', '/')) {
180
+ throw new InputError('Skill design target does not match its task');
181
+ }
182
+ const priority = draft.priority;
183
+ if (priority !== 'high' && priority !== 'normal' && priority !== 'low') {
184
+ throw new InputError('Invalid Skill design priority');
185
+ }
186
+ const regenerated = draftSkillAddition({
187
+ entry,
188
+ priority,
189
+ instruction: requireText(draft.instruction, 'Skill design instruction'),
190
+ sources: stringList(draft.sources, 'Skill design sources'),
191
+ when: draft.when === undefined ? undefined : requireText(draft.when, 'Skill design trigger'),
192
+ });
193
+ if (regenerated.id !== draft.id || regenerated.baseline.sha256 !== baseline.sha256 ||
194
+ JSON.stringify(regenerated.changes) !== JSON.stringify(draft.changes)) {
195
+ throw new InputError('Skill design draft does not reproduce from its target baseline');
196
+ }
197
+ receipt.status = 'reviewed';
198
+ receipt.review = { status: 'passed', checks: ['target matches task', 'draft reproduces from baseline', 'evidence is present'] };
199
+ saveReceipt(root, receipt);
200
+ return receipt;
201
+ }
202
+ export function replaySkillDesign(root, designId, options) {
203
+ const receipt = readReceipt(root, designId);
204
+ if (receipt.status !== 'reviewed' && receipt.status !== 'replayed') {
205
+ throw new InputError('Review the Skill design before replay');
206
+ }
207
+ const replay = (receipt.design.draft.mode === 'package'
208
+ ? replaySkillPackage(root, receipt.design.draft, options)
209
+ : replaySkillAddition(root, receipt.design.draft, options));
210
+ receipt.status = 'replayed';
211
+ receipt.replay_receipt_id = requireText(replay.id, 'replay receipt ID');
212
+ saveReceipt(root, receipt);
213
+ return { ...receipt, replay };
214
+ }
215
+ export function applySkillDesign(root, designId, rollback = false) {
216
+ const receipt = readReceipt(root, designId);
217
+ if (!receipt.replay_receipt_id)
218
+ throw new InputError('Replay the Skill design before applying it');
219
+ if (!rollback && receipt.status !== 'replayed' && receipt.status !== 'applied') {
220
+ throw new InputError('Skill design is not ready for application');
221
+ }
222
+ const result = changeSkillVersion(root, receipt.replay_receipt_id, rollback);
223
+ receipt.status = rollback ? 'rolled_back' : 'applied';
224
+ saveReceipt(root, receipt);
225
+ return { ...result, design_id: designId, replay_receipt_id: receipt.replay_receipt_id };
226
+ }
@@ -0,0 +1,55 @@
1
+ import { type KnowledgeReadsReceipt } from './knowledge-reads.js';
2
+ interface Observation {
3
+ passed: boolean;
4
+ loaded: Array<{
5
+ path: string;
6
+ sha256: string;
7
+ }>;
8
+ knowledgeReads?: KnowledgeReadsReceipt;
9
+ }
10
+ export declare function replaySkillAddition(root: string, data: unknown, options: {
11
+ runner: string;
12
+ scenarios: unknown;
13
+ }): {
14
+ mode?: "addition" | "package";
15
+ base: string;
16
+ candidate: string;
17
+ entry: string;
18
+ package_path?: string;
19
+ files: string[];
20
+ sources: string[];
21
+ runnerSha256: string;
22
+ scenarios: Array<{
23
+ id: string;
24
+ inputSha256: string;
25
+ baseline: Observation;
26
+ candidate: Observation;
27
+ }>;
28
+ id: string;
29
+ };
30
+ export declare function replaySkillPackage(root: string, data: unknown, options: {
31
+ runner: string;
32
+ scenarios: unknown;
33
+ }): {
34
+ mode?: "addition" | "package";
35
+ base: string;
36
+ candidate: string;
37
+ entry: string;
38
+ package_path?: string;
39
+ files: string[];
40
+ sources: string[];
41
+ runnerSha256: string;
42
+ scenarios: Array<{
43
+ id: string;
44
+ inputSha256: string;
45
+ baseline: Observation;
46
+ candidate: Observation;
47
+ }>;
48
+ id: string;
49
+ };
50
+ export declare function changeSkillVersion(root: string, id: string, rollback?: boolean): {
51
+ id: string;
52
+ commit: string;
53
+ replayed: boolean;
54
+ };
55
+ export {};