@forwardimpact/libharness 0.1.22 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/LICENSE +21 -201
  2. package/README.md +196 -80
  3. package/bin/fit-benchmark.js +44 -0
  4. package/bin/fit-harness.js +358 -0
  5. package/bin/fit-selfedit.js +165 -0
  6. package/bin/fit-trace.js +510 -0
  7. package/package.json +41 -11
  8. package/src/agent-runner.js +256 -0
  9. package/src/benchmark/apm-installer.js +207 -0
  10. package/src/benchmark/env-loader.js +158 -0
  11. package/src/benchmark/hook-env.js +40 -0
  12. package/src/benchmark/invariants.js +141 -0
  13. package/src/benchmark/judge.js +187 -0
  14. package/src/benchmark/npm-installer.js +87 -0
  15. package/src/benchmark/report.js +522 -0
  16. package/src/benchmark/result.js +127 -0
  17. package/src/benchmark/runner.js +583 -0
  18. package/src/benchmark/task-family.js +260 -0
  19. package/src/benchmark/workdir.js +298 -0
  20. package/src/commands/assert.js +153 -0
  21. package/src/commands/benchmark-definition.js +165 -0
  22. package/src/commands/benchmark-invariants.js +73 -0
  23. package/src/commands/benchmark-report.js +51 -0
  24. package/src/commands/benchmark-run.js +111 -0
  25. package/src/commands/by-discussion.js +94 -0
  26. package/src/commands/callback.js +119 -0
  27. package/src/commands/discuss.js +132 -0
  28. package/src/commands/facilitate.js +123 -0
  29. package/src/commands/output.js +36 -0
  30. package/src/commands/run.js +152 -0
  31. package/src/commands/supervise.js +136 -0
  32. package/src/commands/task-input.js +54 -0
  33. package/src/commands/tee.js +53 -0
  34. package/src/commands/trace.js +630 -0
  35. package/src/commands/work-tracker.js +35 -0
  36. package/src/cost.js +79 -0
  37. package/src/discuss-tools.js +173 -0
  38. package/src/discusser.js +394 -0
  39. package/src/events/github.js +161 -0
  40. package/src/facilitator.js +205 -0
  41. package/src/inbox-poller.js +81 -0
  42. package/src/index.js +72 -2
  43. package/src/judge.js +210 -0
  44. package/src/message-bus.js +118 -0
  45. package/src/orchestration-loop.js +330 -0
  46. package/src/orchestration-toolkit.js +441 -0
  47. package/src/orchestrator-helpers.js +23 -0
  48. package/src/profile-prompt.js +266 -0
  49. package/src/redaction.js +253 -0
  50. package/src/render/line-renderer.js +54 -0
  51. package/src/render/orchestrator-filter.js +19 -0
  52. package/src/render/palette.js +63 -0
  53. package/src/render/tool-hints.js +154 -0
  54. package/src/render/turn-renderer.js +96 -0
  55. package/src/reply-emitter.js +47 -0
  56. package/src/sequence-counter.js +21 -0
  57. package/src/signature-filter.js +27 -0
  58. package/src/supervisor.js +236 -0
  59. package/src/tee-writer.js +150 -0
  60. package/src/trace-collector.js +444 -0
  61. package/src/trace-github.js +473 -0
  62. package/src/trace-multi.js +101 -0
  63. package/src/trace-query.js +748 -0
  64. package/src/trace-render.js +211 -0
  65. package/src/trace-usage.js +249 -0
  66. package/src/fixture/assertions.js +0 -42
  67. package/src/fixture/cache.js +0 -50
  68. package/src/fixture/eval.js +0 -146
  69. package/src/fixture/index.js +0 -9
  70. package/src/fixture/pathway.js +0 -451
  71. package/src/fixture/services.js +0 -56
  72. package/src/mock/clients.js +0 -135
  73. package/src/mock/config.js +0 -45
  74. package/src/mock/data.js +0 -46
  75. package/src/mock/fs.js +0 -111
  76. package/src/mock/grpc.js +0 -94
  77. package/src/mock/http.js +0 -60
  78. package/src/mock/index.js +0 -36
  79. package/src/mock/infra.js +0 -219
  80. package/src/mock/logger.js +0 -42
  81. package/src/mock/observer.js +0 -74
  82. package/src/mock/resource-index.js +0 -95
  83. package/src/mock/service-callbacks.js +0 -39
  84. package/src/mock/services.js +0 -79
  85. package/src/mock/spy.js +0 -44
  86. package/src/mock/storage.js +0 -118
@@ -1,9 +0,0 @@
1
- export {
2
- assertThrowsMessage,
3
- assertRejectsMessage,
4
- createDeferred,
5
- } from "./assertions.js";
6
- export * from "./services.js";
7
- export * from "./pathway.js";
8
- export * from "./eval.js";
9
- export { memoizeAsync, memoizeOnSubject } from "./cache.js";
@@ -1,451 +0,0 @@
1
- /**
2
- * Pathway test fixtures for creating realistic test data
3
- * Provides mock disciplines, levels, tracks, skills, and behaviours
4
- */
5
-
6
- /**
7
- * Creates a mock level definition
8
- * @param {object} overrides - Properties to override
9
- * @returns {object} Mock level
10
- */
11
- export function createTestLevel(overrides = {}) {
12
- return {
13
- id: "mid",
14
- name: "Mid-Level",
15
- ordinalRank: 3,
16
- professionalTitle: "Level III",
17
- managementTitle: "Manager",
18
- baseSkillProficiencies: {
19
- core: "working",
20
- supporting: "foundational",
21
- broad: "awareness",
22
- },
23
- baseBehaviourMaturity: "developing",
24
- expectations: {},
25
- ...overrides,
26
- };
27
- }
28
-
29
- /**
30
- * Creates a set of mock levels spanning junior to senior
31
- * @returns {object[]} Array of mock levels
32
- */
33
- export function createTestLevels() {
34
- return [
35
- createTestLevel({
36
- id: "junior",
37
- name: "Junior",
38
- ordinalRank: 1,
39
- professionalTitle: "Level I",
40
- managementTitle: "Team Lead",
41
- baseSkillProficiencies: {
42
- core: "foundational",
43
- supporting: "awareness",
44
- broad: "awareness",
45
- },
46
- baseBehaviourMaturity: "emerging",
47
- }),
48
- createTestLevel({
49
- id: "mid",
50
- name: "Mid-Level",
51
- ordinalRank: 3,
52
- professionalTitle: "Level III",
53
- managementTitle: "Manager",
54
- baseSkillProficiencies: {
55
- core: "working",
56
- supporting: "foundational",
57
- broad: "awareness",
58
- },
59
- baseBehaviourMaturity: "developing",
60
- }),
61
- createTestLevel({
62
- id: "senior",
63
- name: "Senior",
64
- ordinalRank: 5,
65
- professionalTitle: "Senior",
66
- managementTitle: "Senior Manager",
67
- baseSkillProficiencies: {
68
- core: "practitioner",
69
- supporting: "working",
70
- broad: "foundational",
71
- },
72
- baseBehaviourMaturity: "practicing",
73
- }),
74
- createTestLevel({
75
- id: "staff",
76
- name: "Staff",
77
- ordinalRank: 7,
78
- professionalTitle: "Staff",
79
- managementTitle: "Director",
80
- baseSkillProficiencies: {
81
- core: "expert",
82
- supporting: "practitioner",
83
- broad: "working",
84
- },
85
- baseBehaviourMaturity: "role_modeling",
86
- }),
87
- ];
88
- }
89
-
90
- /**
91
- * Creates a mock skill definition
92
- * @param {object} overrides - Properties to override
93
- * @returns {object} Mock skill
94
- */
95
- export function createTestSkill(overrides = {}) {
96
- return {
97
- id: "test_skill",
98
- name: "Test Skill",
99
- capability: "delivery",
100
- isHumanOnly: false,
101
- proficiencyDescriptions: {
102
- awareness: "Basic awareness",
103
- foundational: "Foundational understanding",
104
- working: "Working proficiency",
105
- practitioner: "Practitioner level",
106
- expert: "Expert level",
107
- },
108
- ...overrides,
109
- };
110
- }
111
-
112
- /**
113
- * Creates a set of mock skills across capabilities
114
- * @returns {object[]} Array of mock skills
115
- */
116
- export function createTestSkills() {
117
- return [
118
- createTestSkill({
119
- id: "coding",
120
- name: "Coding",
121
- capability: "delivery",
122
- }),
123
- createTestSkill({
124
- id: "testing",
125
- name: "Testing",
126
- capability: "delivery",
127
- }),
128
- createTestSkill({
129
- id: "architecture",
130
- name: "Architecture",
131
- capability: "scale",
132
- }),
133
- createTestSkill({
134
- id: "observability",
135
- name: "Observability",
136
- capability: "scale",
137
- }),
138
- createTestSkill({
139
- id: "ai_tools",
140
- name: "AI Tools",
141
- capability: "ai",
142
- }),
143
- createTestSkill({
144
- id: "mentoring",
145
- name: "Mentoring",
146
- capability: "delivery",
147
- isHumanOnly: true,
148
- }),
149
- ];
150
- }
151
-
152
- /**
153
- * Creates a mock discipline definition
154
- * @param {object} overrides - Properties to override
155
- * @returns {object} Mock discipline
156
- */
157
- export function createTestDiscipline(overrides = {}) {
158
- return {
159
- id: "software_engineering",
160
- name: "Software Engineering",
161
- roleTitle: "Software Engineer",
162
- isProfessional: true,
163
- isManagement: false,
164
- coreSkills: ["coding", "testing"],
165
- supportingSkills: ["architecture"],
166
- broadSkills: ["observability"],
167
- behaviourModifiers: {},
168
- validTracks: [],
169
- ...overrides,
170
- };
171
- }
172
-
173
- /**
174
- * Creates a mock track definition
175
- * @param {object} overrides - Properties to override
176
- * @returns {object} Mock track
177
- */
178
- export function createTestTrack(overrides = {}) {
179
- return {
180
- id: "platform",
181
- name: "Platform",
182
- skillModifiers: { scale: 1, delivery: -1 },
183
- behaviourModifiers: {},
184
- ...overrides,
185
- };
186
- }
187
-
188
- /**
189
- * Creates a mock behaviour definition
190
- * @param {object} overrides - Properties to override
191
- * @returns {object} Mock behaviour
192
- */
193
- export function createTestBehaviour(overrides = {}) {
194
- return {
195
- id: "collaboration",
196
- name: "Collaboration",
197
- maturityDescriptions: {
198
- emerging: "Beginning to collaborate",
199
- developing: "Developing collaboration",
200
- practicing: "Practicing collaboration",
201
- role_modeling: "Role modeling collaboration",
202
- exemplifying: "Exemplifying collaboration",
203
- },
204
- ...overrides,
205
- };
206
- }
207
-
208
- /**
209
- * Creates a set of mock behaviours
210
- * @returns {object[]} Array of mock behaviours
211
- */
212
- export function createTestBehaviours() {
213
- return [
214
- createTestBehaviour({ id: "collaboration", name: "Collaboration" }),
215
- createTestBehaviour({ id: "communication", name: "Communication" }),
216
- createTestBehaviour({ id: "leadership", name: "Leadership" }),
217
- ];
218
- }
219
-
220
- /**
221
- * Creates a mock capability definition
222
- * @param {object} overrides - Properties to override
223
- * @returns {object} Mock capability
224
- */
225
- export function createTestCapability(overrides = {}) {
226
- return {
227
- id: "delivery",
228
- name: "Delivery",
229
- emojiIcon: "🚀",
230
- ordinalRank: 1,
231
- professionalResponsibilities: {
232
- foundational: "Delivers assigned tasks",
233
- working: "Delivers features independently",
234
- practitioner: "Leads delivery across team",
235
- expert: "Defines delivery strategy",
236
- },
237
- managementResponsibilities: {
238
- foundational: "Manages delivery timelines",
239
- working: "Owns team delivery",
240
- practitioner: "Leads multi-team delivery",
241
- expert: "Shapes delivery culture",
242
- },
243
- ...overrides,
244
- };
245
- }
246
-
247
- /**
248
- * Creates a mock driver definition
249
- * @param {object} overrides - Properties to override
250
- * @returns {object} Mock driver
251
- */
252
- export function createTestDriver(overrides = {}) {
253
- return {
254
- id: "velocity",
255
- name: "Velocity",
256
- contributingSkills: ["coding", "testing"],
257
- contributingBehaviours: ["collaboration"],
258
- ...overrides,
259
- };
260
- }
261
-
262
- /**
263
- * Creates a mock skill matrix entry
264
- * @param {object} overrides - Properties to override
265
- * @returns {object} Mock skill matrix entry
266
- */
267
- export function createTestSkillEntry(overrides = {}) {
268
- return {
269
- skillId: "coding",
270
- skillName: "Coding",
271
- capability: "delivery",
272
- isHumanOnly: false,
273
- type: "core",
274
- proficiency: "working",
275
- proficiencyDescription: "Working proficiency",
276
- ...overrides,
277
- };
278
- }
279
-
280
- /**
281
- * Creates a mock behaviour profile entry
282
- * @param {object} overrides - Properties to override
283
- * @returns {object} Mock behaviour profile entry
284
- */
285
- export function createTestBehaviourEntry(overrides = {}) {
286
- return {
287
- behaviourId: "collaboration",
288
- behaviourName: "Collaboration",
289
- maturity: "developing",
290
- maturityDescription: "Developing collaboration",
291
- ...overrides,
292
- };
293
- }
294
-
295
- /**
296
- * Creates a set of mock drivers
297
- * @returns {object[]}
298
- */
299
- export function createTestDrivers() {
300
- return [
301
- createTestDriver({
302
- id: "velocity",
303
- name: "Velocity",
304
- contributingSkills: ["coding", "testing"],
305
- contributingBehaviours: ["collaboration"],
306
- }),
307
- createTestDriver({
308
- id: "quality",
309
- name: "Quality",
310
- contributingSkills: ["testing", "architecture"],
311
- contributingBehaviours: ["communication"],
312
- }),
313
- ];
314
- }
315
-
316
- /**
317
- * Creates a set of mock capabilities spanning delivery / scale / ai.
318
- * @returns {object[]}
319
- */
320
- export function createTestCapabilities() {
321
- return [
322
- createTestCapability({ id: "delivery", name: "Delivery", ordinalRank: 1 }),
323
- createTestCapability({ id: "scale", name: "Scale", ordinalRank: 2 }),
324
- createTestCapability({ id: "ai", name: "AI", ordinalRank: 3 }),
325
- ];
326
- }
327
-
328
- /**
329
- * Creates a set of mock tracks.
330
- * @returns {object[]}
331
- */
332
- export function createTestTracks() {
333
- return [
334
- createTestTrack({
335
- id: "platform",
336
- name: "Platform",
337
- skillModifiers: { scale: 1, delivery: -1 },
338
- }),
339
- createTestTrack({
340
- id: "forward_deployed",
341
- name: "Forward Deployed",
342
- skillModifiers: { delivery: 1, scale: -1 },
343
- }),
344
- ];
345
- }
346
-
347
- /**
348
- * Creates a set of mock disciplines.
349
- * @returns {object[]}
350
- */
351
- export function createTestDisciplines() {
352
- return [
353
- createTestDiscipline({
354
- id: "software_engineering",
355
- name: "Software Engineering",
356
- roleTitle: "Software Engineer",
357
- }),
358
- ];
359
- }
360
-
361
- /**
362
- * Builds a complete mock standard (capabilities, skills, disciplines, tracks,
363
- * drivers, behaviours, levels) with sensible defaults. Per-slice overrides
364
- * replace the default for that slice entirely.
365
- *
366
- * @param {object} [overrides]
367
- * @param {object[]} [overrides.capabilities]
368
- * @param {object[]} [overrides.skills]
369
- * @param {object[]} [overrides.disciplines]
370
- * @param {object[]} [overrides.tracks]
371
- * @param {object[]} [overrides.drivers]
372
- * @param {object[]} [overrides.behaviours]
373
- * @param {object[]} [overrides.levels]
374
- * @returns {object} Agent-aligned engineering standard with all slices populated.
375
- */
376
- export function createTestStandard(overrides = {}) {
377
- return {
378
- capabilities: overrides.capabilities ?? createTestCapabilities(),
379
- skills: overrides.skills ?? createTestSkills(),
380
- disciplines: overrides.disciplines ?? createTestDisciplines(),
381
- tracks: overrides.tracks ?? createTestTracks(),
382
- drivers: overrides.drivers ?? createTestDrivers(),
383
- behaviours: overrides.behaviours ?? createTestBehaviours(),
384
- levels: overrides.levels ?? createTestLevels(),
385
- };
386
- }
387
-
388
- /**
389
- * Creates a mock person (activity layer / people roster entry).
390
- * @param {object} [overrides]
391
- * @returns {object}
392
- */
393
- export function createTestPerson(overrides = {}) {
394
- return {
395
- id: "p-alice",
396
- name: "Alice",
397
- email: "alice@example.com",
398
- level: "mid",
399
- discipline: "software_engineering",
400
- track: "platform",
401
- ...overrides,
402
- };
403
- }
404
-
405
- /**
406
- * Creates a mock roster (team snapshot).
407
- * @param {object} [overrides]
408
- * @returns {object}
409
- */
410
- export function createTestRoster(overrides = {}) {
411
- return {
412
- team: "t-alpha",
413
- members: [createTestPerson()],
414
- ...overrides,
415
- };
416
- }
417
-
418
- /**
419
- * Creates a mock evidence row shared across map and landmark tests.
420
- * @param {object} [overrides]
421
- * @returns {object}
422
- */
423
- export function createTestEvidenceRow(overrides = {}) {
424
- return {
425
- skill_id: "coding",
426
- level_id: "mid",
427
- matched: true,
428
- artifact_id: "art-1",
429
- created_at: "2026-01-01T00:00:00Z",
430
- github_artifacts: [],
431
- ...overrides,
432
- };
433
- }
434
-
435
- /**
436
- * Creates a mock skill augmented with per-level markers (human + agent arrays).
437
- * @param {object} [overrides]
438
- * @returns {object}
439
- */
440
- export function createTestSkillWithMarkers(overrides = {}) {
441
- return {
442
- ...createTestSkill(),
443
- markers: {
444
- foundational: { human: ["writes simple code"], agent: [] },
445
- working: { human: ["owns features"], agent: ["reviews PRs"] },
446
- practitioner: { human: ["mentors peers"], agent: [] },
447
- expert: { human: ["shapes strategy"], agent: [] },
448
- },
449
- ...overrides,
450
- };
451
- }
@@ -1,56 +0,0 @@
1
- /**
2
- * Test fixture utilities for creating dynamic test data
3
- */
4
-
5
- /**
6
- * Creates sample request data for testing
7
- * @param {object} overrides - Properties to override
8
- * @returns {object} Test request object
9
- */
10
- export function createTestRequest(overrides = {}) {
11
- return {
12
- query: "test query",
13
- userId: "test-user-123",
14
- sessionId: "test-session-456",
15
- ...overrides,
16
- };
17
- }
18
-
19
- /**
20
- * Creates sample vector data for testing
21
- * @param {number} count - Number of vectors to create
22
- * @returns {Array} Array of test vectors
23
- */
24
- export function createTestVectors(count = 3) {
25
- return Array.from({ length: count }, (_, i) => ({
26
- id: `vector-${i}`,
27
- embedding: Array.from({ length: 384 }, () => Math.random()),
28
- score: Math.random(),
29
- }));
30
- }
31
-
32
- /**
33
- * Creates sample message data for testing
34
- * @param {number} count - Number of messages to create
35
- * @returns {Array} Array of test messages
36
- */
37
- export function createTestMessages(count = 3) {
38
- const roles = ["system", "user", "assistant"];
39
- return Array.from({ length: count }, (_, i) => ({
40
- role: roles[i % 3],
41
- content: `Test message ${i + 1}`,
42
- }));
43
- }
44
-
45
- /**
46
- * Creates sample chunk data for testing
47
- * @param {number} count - Number of chunks to create
48
- * @returns {Array} Array of test chunks
49
- */
50
- export function createTestChunks(count = 3) {
51
- return Array.from({ length: count }, (_, i) => ({
52
- id: `chunk-${i}`,
53
- text: `This is test chunk ${i + 1} with sample content.`,
54
- tokens: Math.floor(Math.random() * 100) + 10,
55
- }));
56
- }
@@ -1,135 +0,0 @@
1
- import { spy } from "./spy.js";
2
- import { common } from "@forwardimpact/libtype";
3
-
4
- /**
5
- * Creates a mock memory client
6
- * @param {object} overrides - Method overrides
7
- * @returns {object} Mock memory client
8
- */
9
- export function createMockMemoryClient(overrides = {}) {
10
- return {
11
- GetWindow: spy(() =>
12
- Promise.resolve({
13
- messages: [{ role: "system", content: "You are an assistant" }],
14
- tools: [],
15
- }),
16
- ),
17
- AppendMemory: spy(() => Promise.resolve({ accepted: "test-id" })),
18
- ...overrides,
19
- };
20
- }
21
-
22
- /**
23
- * Creates a mock LLM client
24
- * @param {object} overrides - Method overrides
25
- * @returns {object} Mock LLM client
26
- */
27
- export function createMockLlmClient(overrides = {}) {
28
- return {
29
- CreateCompletions: spy(() =>
30
- Promise.resolve({
31
- id: "test-completion",
32
- choices: [
33
- {
34
- message: common.Message.fromObject({
35
- role: "assistant",
36
- content: "Test response",
37
- }),
38
- },
39
- ],
40
- usage: { total_tokens: 100 },
41
- }),
42
- ),
43
- CreateEmbeddings: spy(() =>
44
- Promise.resolve({
45
- data: [{ index: 0, embedding: [0.1, 0.2, 0.3] }],
46
- }),
47
- ),
48
- ...overrides,
49
- };
50
- }
51
-
52
- /**
53
- * Creates a mock agent client
54
- * @param {object} overrides - Method overrides
55
- * @returns {object} Mock agent client
56
- */
57
- export function createMockAgentClient(overrides = {}) {
58
- return {
59
- ProcessUnary: spy(() =>
60
- Promise.resolve({
61
- resource_id: "test-conversation",
62
- choices: [
63
- {
64
- message: common.Message.fromObject({
65
- role: "assistant",
66
- content: "Test response",
67
- }),
68
- },
69
- ],
70
- }),
71
- ),
72
- ProcessStream: spy(),
73
- ...overrides,
74
- };
75
- }
76
-
77
- /**
78
- * Creates a mock trace client
79
- * @param {object} overrides - Method overrides
80
- * @returns {object} Mock trace client
81
- */
82
- export function createMockTraceClient(overrides = {}) {
83
- return {
84
- RecordSpan: spy(() => Promise.resolve()),
85
- ...overrides,
86
- };
87
- }
88
-
89
- /**
90
- * Creates a mock vector client
91
- * @param {object} overrides - Method overrides
92
- * @returns {object} Mock vector client
93
- */
94
- export function createMockVectorClient(overrides = {}) {
95
- return {
96
- SearchContent: spy(() =>
97
- Promise.resolve({
98
- identifiers: [],
99
- }),
100
- ),
101
- ...overrides,
102
- };
103
- }
104
-
105
- /**
106
- * Creates a mock graph client
107
- * @param {object} overrides - Method overrides
108
- * @returns {object} Mock graph client
109
- */
110
- export function createMockGraphClient(overrides = {}) {
111
- return {
112
- QueryByPattern: spy(() =>
113
- Promise.resolve({
114
- identifiers: [],
115
- }),
116
- ),
117
- ...overrides,
118
- };
119
- }
120
-
121
- /**
122
- * Creates a mock tool client
123
- * @param {object} overrides - Method overrides
124
- * @returns {object} Mock tool client
125
- */
126
- export function createMockToolClient(overrides = {}) {
127
- return {
128
- CallTool: spy(() =>
129
- Promise.resolve({
130
- content: "Tool result",
131
- }),
132
- ),
133
- ...overrides,
134
- };
135
- }
@@ -1,45 +0,0 @@
1
- /**
2
- * Creates a mock configuration object
3
- * @param {string} name - Service/extension name
4
- * @param {object} overrides - Properties to override
5
- * @returns {object} Mock config
6
- */
7
- export function createMockConfig(name = "test-service", overrides = {}) {
8
- return {
9
- name,
10
- namespace: "test",
11
- host: "0.0.0.0",
12
- port: 3000,
13
- max_tokens: 4096,
14
- ...overrides,
15
- };
16
- }
17
-
18
- /**
19
- * Creates a mock service config with common service properties
20
- * @param {string} name - Service name
21
- * @param {object} overrides - Properties to override
22
- * @returns {object} Mock service config
23
- */
24
- export function createMockServiceConfig(name, overrides = {}) {
25
- return createMockConfig(name, {
26
- budget: 1000,
27
- threshold: 0.3,
28
- limit: 10,
29
- ...overrides,
30
- });
31
- }
32
-
33
- /**
34
- * Creates a mock extension config
35
- * @param {string} name - Extension name
36
- * @param {object} overrides - Properties to override
37
- * @returns {object} Mock extension config
38
- */
39
- export function createMockExtensionConfig(name, overrides = {}) {
40
- return createMockConfig(name, {
41
- secret: "test-secret",
42
- anthropicToken: async () => "test-anthropic-key",
43
- ...overrides,
44
- });
45
- }