@holoscript/framework 6.0.3 → 6.0.4
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.
- package/CHANGELOG.md +1 -2
- package/ROADMAP.md +68 -66
- package/dist/{InvisibleWallet-BB6tFvRA.d.cts → InvisibleWallet-EFiuaLn3.d.cts} +1 -1
- package/dist/{OrchestratorAgent-BvWgf9uw.d.cts → OrchestratorAgent-CrLDGNL6.d.cts} +1 -1
- package/dist/agents/index.cjs +11 -10
- package/dist/agents/index.d.cts +4 -16
- package/dist/ai/index.cjs +2 -2
- package/dist/behavior.cjs +10 -0
- package/dist/economy/index.cjs +4 -4
- package/dist/economy/index.d.cts +2 -2
- package/dist/index.cjs +33 -11
- package/dist/index.d.cts +3 -3
- package/dist/swarm/index.cjs +3 -0
- package/package.json +14 -9
- package/src/__tests__/bounty-marketplace.test.ts +53 -21
- package/src/__tests__/delegation.test.ts +1 -4
- package/src/__tests__/done-log-audit.test.ts +38 -46
- package/src/__tests__/framework.test.ts +172 -53
- package/src/__tests__/goal-synthesizer.test.ts +9 -6
- package/src/__tests__/presence.test.ts +1 -1
- package/src/__tests__/protocol-agent.test.ts +12 -11
- package/src/__tests__/revenue-splitter.test.ts +22 -15
- package/src/__tests__/scenario-driven-todo.test.ts +55 -35
- package/src/__tests__/self-improve.test.ts +28 -9
- package/src/__tests__/service-lifecycle.test.ts +9 -3
- package/src/__tests__/skill-router.test.ts +3 -3
- package/src/agents/CulturalMemory.ts +6 -6
- package/src/agents/DelegationTraceHooks.ts +560 -0
- package/src/agents/FederatedRegistryAdapter.ts +1 -1
- package/src/agents/NormEngine.ts +3 -8
- package/src/agents/OrchestratorAgent.ts +1 -1
- package/src/agents/TaskDelegationService.ts +5 -9
- package/src/agents/__tests__/AgentWalletRegistry.test.ts +5 -4
- package/src/agents/__tests__/CrossRealityHandoff.test.ts +9 -3
- package/src/agents/__tests__/DelegationTraceHooks.test.ts +390 -0
- package/src/agents/__tests__/TaskDelegationService.test.ts +4 -2
- package/src/agents/spatial-comms/Layer1RealTime.ts +36 -19
- package/src/agents/spatial-comms/Layer2A2A.ts +1 -3
- package/src/agents/spatial-comms/Layer3MCP.ts +13 -4
- package/src/agents/spatial-comms/ProtocolTypes.ts +5 -2
- package/src/agents/spatial-comms/examples/multi-agent-world-creation.ts +2 -2
- package/src/ai/HoloScriptGenerator.ts +2 -2
- package/src/ai/__tests__/PerceptionSystem.prod.test.ts +1 -1
- package/src/ai/__tests__/PerceptionSystem.test.ts +14 -14
- package/src/ai/__tests__/SteeringBehaviors.prod.test.ts +1 -1
- package/src/ai/index.ts +5 -1
- package/src/board/audit.ts +17 -6
- package/src/board/board-ops.ts +45 -15
- package/src/board/board-types.ts +94 -20
- package/src/delegation.ts +5 -3
- package/src/distributed-claimer.ts +13 -2
- package/src/economy/BountyManager.ts +40 -18
- package/src/economy/KnowledgeMarketplace.ts +27 -8
- package/src/economy/PaymentWebhookService.ts +0 -1
- package/src/economy/RevenueSplitter.ts +2 -4
- package/src/economy/UnifiedBudgetOptimizer.ts +8 -9
- package/src/economy/_core-stubs.ts +1 -1
- package/src/economy/x402-facilitator.ts +17 -8
- package/src/index.ts +16 -12
- package/src/knowledge/__tests__/knowledge-consolidator.test.ts +138 -89
- package/src/knowledge/__tests__/knowledge-store-vector.test.ts +59 -16
- package/src/knowledge/brain.ts +7 -7
- package/src/knowledge/consolidation.ts +16 -16
- package/src/knowledge/knowledge-consolidator.ts +60 -30
- package/src/knowledge/knowledge-store.ts +83 -45
- package/src/learning/ProceduralCompiler.ts +6 -1
- package/src/learning/learning/MemoryConsolidator.ts +102 -0
- package/src/learning/learning/MemoryScorer.ts +69 -0
- package/src/learning/learning/ProceduralCompiler.ts +45 -0
- package/src/learning/learning/SemanticClusterer.ts +66 -0
- package/src/llm/llm-adapter.ts +24 -10
- package/src/mesh/index.ts +37 -17
- package/src/protocol/goal-synthesizer.ts +24 -34
- package/src/protocol/implementations.ts +91 -22
- package/src/protocol/micro-phase-decomposer.ts +25 -17
- package/src/protocol/micro-step-decomposer.test.ts +104 -39
- package/src/protocol-agent.test.ts +17 -7
- package/src/protocol-agent.ts +45 -42
- package/src/self-improve/absorb-scanner.ts +9 -6
- package/src/self-improve/evolution-engine.ts +36 -18
- package/src/self-improve/framework-absorber.ts +21 -16
- package/src/self-improve/index.ts +2 -10
- package/src/self-improve/prompt-optimizer.ts +31 -19
- package/src/self-improve/test-generator.ts +16 -12
- package/src/skill-router.ts +7 -6
- package/src/swarm/messaging/GossipProtocol.ts +1 -1
- package/src/swarm/messaging/__tests__/BroadcastChannel.prod.test.ts +31 -9
- package/src/swarm/messaging/__tests__/GossipProtocol.prod.test.ts +21 -7
- package/src/swarm/messaging/__tests__/SwarmEventBus.prod.test.ts +24 -8
- package/src/swarm/messaging/__tests__/SwarmEventBus.test.ts +6 -2
- package/src/team.ts +277 -122
- package/src/training/scripts/generate-spatial-dataset.ts +1 -1
- package/src/training/training/LRScheduler.ts +377 -0
- package/src/training/training/QualityScoringPipeline.ts +139 -0
- package/src/training/training/SoftDedup.ts +461 -0
- package/src/training/training/SparsityMonitor.ts +685 -0
- package/src/training/training/SparsityMonitorTypes.ts +209 -0
- package/src/training/training/SpatialTrainingDataGenerator.ts +1526 -0
- package/src/training/training/SpatialTrainingDataTypes.ts +216 -0
- package/src/training/training/TrainingPipelineConfig.ts +215 -0
- package/src/training/training/__tests__/CorpusValidation.test.ts +87 -0
- package/src/training/training/__tests__/LRScheduler.test.ts +592 -0
- package/src/training/training/__tests__/SoftDedup.test.ts +415 -0
- package/src/training/training/__tests__/SparsityMonitor.test.ts +1623 -0
- package/src/training/training/__tests__/SpatialCorpusValidation.test.ts +72 -0
- package/src/training/training/__tests__/SpatialTrainingDataGenerator.test.ts +1244 -0
- package/src/training/training/__tests__/TrainingMonkeyIntegration.test.ts +897 -0
- package/src/training/training/__tests__/TrainingPipelineConfig.test.ts +202 -0
- package/src/training/training/__tests__/schema.test.ts +72 -0
- package/src/training/training/__tests__/training-constants.test.ts +106 -0
- package/src/training/training/__tests__/trait-mappings.test.ts +81 -0
- package/src/training/training/constants.ts +94 -0
- package/src/training/training/index.ts +17 -0
- package/src/training/training/schema.ts +147 -0
- package/src/training/training/scripts/generate-novel-use-cases-dataset.ts +272 -0
- package/src/training/training/scripts/generate-spatial-dataset.ts +521 -0
- package/src/training/training/trainingmonkey/TrainingMonkeyIntegration.ts +477 -0
- package/src/training/training/trainingmonkey/TrainingMonkeyTypes.ts +230 -0
- package/src/training/training/trainingmonkey/index.ts +26 -0
- package/src/training/training/trait-mappings.ts +157 -0
- package/src/types.ts +2 -7
- package/ALL-test-results.json +0 -1
- package/LICENSE +0 -21
- package/dist/AgentManifest-CB4xM-Ma.d.ts +0 -704
- package/dist/BehaviorTree-BrBFECv5.d.ts +0 -103
- package/dist/InvisibleWallet-rtRrBOA8.d.ts +0 -1732
- package/dist/OrchestratorAgent-Q_CbVTmO.d.ts +0 -798
- package/dist/agents/index.d.ts +0 -1788
- package/dist/agents/index.js +0 -4695
- package/dist/ai/index.d.ts +0 -1753
- package/dist/ai/index.js +0 -5244
- package/dist/behavior.d.ts +0 -130
- package/dist/behavior.js +0 -407
- package/dist/economy/index.d.ts +0 -747
- package/dist/economy/index.js +0 -3617
- package/dist/implementations-D9T3un9D.d.ts +0 -236
- package/dist/index.d.ts +0 -1729
- package/dist/index.js +0 -24277
- package/dist/learning/index.d.ts +0 -104
- package/dist/learning/index.js +0 -189
- package/dist/negotiation/index.d.ts +0 -610
- package/dist/negotiation/index.js +0 -931
- package/dist/skills/index.d.ts +0 -289
- package/dist/skills/index.js +0 -1079
- package/dist/swarm/index.d.ts +0 -2433
- package/dist/swarm/index.js +0 -5221
- package/dist/training/index.d.ts +0 -1734
- package/dist/training/index.js +0 -2687
- package/extract-failures.js +0 -10
- package/src/training/training/data/novel-use-cases.jsonl +0 -153
- package/src/training/training/data/spatial-reasoning-10k.jsonl +0 -9354
- package/src/types/core-stubs.d.ts +0 -113
- package/test-output.txt +0 -0
- package/test-result.json +0 -1
- package/tsc-errors.txt +0 -4
- package/tsc_output.txt +0 -0
- package/typescript-errors-2.txt +0 -0
- package/typescript-errors.txt +0 -22
- package/vitest-log-utf8.txt +0 -268
- package/vitest-log.txt +0 -0
|
@@ -21,7 +21,7 @@ describe('PerceptionSystem', () => {
|
|
|
21
21
|
id: 's1',
|
|
22
22
|
type: 'sight',
|
|
23
23
|
sourceId: 'player',
|
|
24
|
-
position:
|
|
24
|
+
position: [10, 0, 0],
|
|
25
25
|
intensity: 0.8,
|
|
26
26
|
timestamp: 0,
|
|
27
27
|
});
|
|
@@ -33,7 +33,7 @@ describe('PerceptionSystem', () => {
|
|
|
33
33
|
id: 's1',
|
|
34
34
|
type: 'sight',
|
|
35
35
|
sourceId: 'p',
|
|
36
|
-
position:
|
|
36
|
+
position: [0, 0, 0],
|
|
37
37
|
intensity: 1,
|
|
38
38
|
timestamp: 0,
|
|
39
39
|
});
|
|
@@ -52,7 +52,7 @@ describe('PerceptionSystem', () => {
|
|
|
52
52
|
id: 's1',
|
|
53
53
|
type: 'sight',
|
|
54
54
|
sourceId: 'player',
|
|
55
|
-
position:
|
|
55
|
+
position: [10, 0, 0],
|
|
56
56
|
intensity: 0.9,
|
|
57
57
|
timestamp: 0,
|
|
58
58
|
});
|
|
@@ -67,7 +67,7 @@ describe('PerceptionSystem', () => {
|
|
|
67
67
|
id: 's1',
|
|
68
68
|
type: 'sight',
|
|
69
69
|
sourceId: 'player',
|
|
70
|
-
position:
|
|
70
|
+
position: [200, 0, 0],
|
|
71
71
|
intensity: 0.9,
|
|
72
72
|
timestamp: 0,
|
|
73
73
|
});
|
|
@@ -86,7 +86,7 @@ describe('PerceptionSystem', () => {
|
|
|
86
86
|
id: 's1',
|
|
87
87
|
type: 'sight',
|
|
88
88
|
sourceId: 'player',
|
|
89
|
-
position:
|
|
89
|
+
position: [-10, 0, 0],
|
|
90
90
|
intensity: 1,
|
|
91
91
|
timestamp: 0,
|
|
92
92
|
}); // behind
|
|
@@ -101,7 +101,7 @@ describe('PerceptionSystem', () => {
|
|
|
101
101
|
id: 's1',
|
|
102
102
|
type: 'hearing',
|
|
103
103
|
sourceId: 'player',
|
|
104
|
-
position:
|
|
104
|
+
position: [-10, 0, 0],
|
|
105
105
|
intensity: 0.8,
|
|
106
106
|
timestamp: 0,
|
|
107
107
|
});
|
|
@@ -120,7 +120,7 @@ describe('PerceptionSystem', () => {
|
|
|
120
120
|
id: 's1',
|
|
121
121
|
type: 'sight',
|
|
122
122
|
sourceId: 'guard',
|
|
123
|
-
position:
|
|
123
|
+
position: [0, 0, 0],
|
|
124
124
|
intensity: 1,
|
|
125
125
|
timestamp: 0,
|
|
126
126
|
});
|
|
@@ -139,7 +139,7 @@ describe('PerceptionSystem', () => {
|
|
|
139
139
|
id: 's1',
|
|
140
140
|
type: 'hearing',
|
|
141
141
|
sourceId: 'player',
|
|
142
|
-
position:
|
|
142
|
+
position: [5, 0, 0],
|
|
143
143
|
intensity: 1,
|
|
144
144
|
timestamp: 0,
|
|
145
145
|
});
|
|
@@ -158,7 +158,7 @@ describe('PerceptionSystem', () => {
|
|
|
158
158
|
id: 's1',
|
|
159
159
|
type: 'sight',
|
|
160
160
|
sourceId: 'player',
|
|
161
|
-
position:
|
|
161
|
+
position: [5, 0, 0],
|
|
162
162
|
intensity: 0.5,
|
|
163
163
|
timestamp: 0,
|
|
164
164
|
});
|
|
@@ -180,7 +180,7 @@ describe('PerceptionSystem', () => {
|
|
|
180
180
|
id: 's1',
|
|
181
181
|
type: 'sight',
|
|
182
182
|
sourceId: 'player',
|
|
183
|
-
position:
|
|
183
|
+
position: [5, 0, 0],
|
|
184
184
|
intensity: 1,
|
|
185
185
|
timestamp: 0,
|
|
186
186
|
});
|
|
@@ -202,7 +202,7 @@ describe('PerceptionSystem', () => {
|
|
|
202
202
|
id: 'a',
|
|
203
203
|
type: 'sight',
|
|
204
204
|
sourceId: 'p1',
|
|
205
|
-
position:
|
|
205
|
+
position: [5, 0, 0],
|
|
206
206
|
intensity: 0.5,
|
|
207
207
|
timestamp: 0,
|
|
208
208
|
});
|
|
@@ -210,7 +210,7 @@ describe('PerceptionSystem', () => {
|
|
|
210
210
|
id: 'b',
|
|
211
211
|
type: 'sight',
|
|
212
212
|
sourceId: 'p2',
|
|
213
|
-
position:
|
|
213
|
+
position: [10, 0, 0],
|
|
214
214
|
intensity: 0.9,
|
|
215
215
|
timestamp: 0,
|
|
216
216
|
});
|
|
@@ -225,7 +225,7 @@ describe('PerceptionSystem', () => {
|
|
|
225
225
|
id: 'weak',
|
|
226
226
|
type: 'sight',
|
|
227
227
|
sourceId: 'p1',
|
|
228
|
-
position:
|
|
228
|
+
position: [40, 0, 0],
|
|
229
229
|
intensity: 0.1,
|
|
230
230
|
timestamp: 0,
|
|
231
231
|
});
|
|
@@ -233,7 +233,7 @@ describe('PerceptionSystem', () => {
|
|
|
233
233
|
id: 'strong',
|
|
234
234
|
type: 'sight',
|
|
235
235
|
sourceId: 'p2',
|
|
236
|
-
position:
|
|
236
|
+
position: [5, 0, 0],
|
|
237
237
|
intensity: 1,
|
|
238
238
|
timestamp: 0,
|
|
239
239
|
});
|
|
@@ -10,7 +10,7 @@ import { SteeringBehaviors, type SteeringAgent } from '../SteeringBehaviors';
|
|
|
10
10
|
|
|
11
11
|
function agent(px = 0, py = 0, pz = 0, vx = 0, vy = 0, vz = 0): SteeringAgent {
|
|
12
12
|
return {
|
|
13
|
-
position:
|
|
13
|
+
position: [px, py, pz],
|
|
14
14
|
velocity: { x: vx, y: vy, z: vz },
|
|
15
15
|
maxSpeed: 10,
|
|
16
16
|
maxForce: 5,
|
package/src/ai/index.ts
CHANGED
|
@@ -121,7 +121,11 @@ export {
|
|
|
121
121
|
} from './HoloScriptGenerator';
|
|
122
122
|
export { GenerationCache, cachedGenerate } from './GenerationCache';
|
|
123
123
|
export { GenerationAnalytics, createAnalytics } from './GenerationAnalytics';
|
|
124
|
-
export {
|
|
124
|
+
export {
|
|
125
|
+
TrainingDataGenerator,
|
|
126
|
+
createTrainingDataGenerator,
|
|
127
|
+
ALL_CATEGORIES,
|
|
128
|
+
} from './TrainingDataGenerator';
|
|
125
129
|
export { PromptTemplateSystem, QuickPrompts } from './PromptTemplates';
|
|
126
130
|
export type { PromptTemplate, TemplateContext } from './PromptTemplates';
|
|
127
131
|
|
package/src/board/audit.ts
CHANGED
|
@@ -38,7 +38,12 @@ export interface AuditResult {
|
|
|
38
38
|
/** A single violation found by the auditor. */
|
|
39
39
|
export interface AuditViolation {
|
|
40
40
|
/** Which check produced this violation. */
|
|
41
|
-
rule:
|
|
41
|
+
rule:
|
|
42
|
+
| 'missing-completedBy'
|
|
43
|
+
| 'missing-summary'
|
|
44
|
+
| 'missing-commit'
|
|
45
|
+
| 'duplicate-entry'
|
|
46
|
+
| 'non-monotonic-timestamp';
|
|
42
47
|
/** Human-readable description. */
|
|
43
48
|
message: string;
|
|
44
49
|
/** The entry that triggered the violation. */
|
|
@@ -98,7 +103,11 @@ export function isCommitProof(commitHash?: string): boolean {
|
|
|
98
103
|
if (!commitHash) return false;
|
|
99
104
|
const hash = commitHash.trim();
|
|
100
105
|
if (!hash) return false;
|
|
101
|
-
if (
|
|
106
|
+
if (
|
|
107
|
+
['uncommit', 'local-uncommitted', 'local_uncommitted', 'none', 'n/a', 'na'].includes(
|
|
108
|
+
hash.toLowerCase()
|
|
109
|
+
)
|
|
110
|
+
) {
|
|
102
111
|
return false;
|
|
103
112
|
}
|
|
104
113
|
return /^[0-9a-f]{7,40}$/i.test(hash);
|
|
@@ -121,7 +130,8 @@ export function auditDoneLog(doneLog: DoneLogEntry[]): AuditResult {
|
|
|
121
130
|
.map(([title, count]) => ({ title, count }));
|
|
122
131
|
|
|
123
132
|
const denominator = proofRequired.length;
|
|
124
|
-
const verificationRate =
|
|
133
|
+
const verificationRate =
|
|
134
|
+
denominator > 0 ? Math.round((verified.length / denominator) * 100) : 100;
|
|
125
135
|
|
|
126
136
|
return {
|
|
127
137
|
total: doneLog.length,
|
|
@@ -140,9 +150,10 @@ export function auditDoneLog(doneLog: DoneLogEntry[]): AuditResult {
|
|
|
140
150
|
duplicateTasks: duped,
|
|
141
151
|
health: {
|
|
142
152
|
verificationRate,
|
|
143
|
-
message:
|
|
144
|
-
|
|
145
|
-
|
|
153
|
+
message:
|
|
154
|
+
unverified.length === 0
|
|
155
|
+
? 'All tasks have commit proof.'
|
|
156
|
+
: `${unverified.length} tasks need verification — missing or invalid commit proof.`,
|
|
146
157
|
},
|
|
147
158
|
};
|
|
148
159
|
}
|
package/src/board/board-ops.ts
CHANGED
|
@@ -6,7 +6,14 @@
|
|
|
6
6
|
* The HTTP layer calls these and handles persistence + responses.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import type {
|
|
9
|
+
import type {
|
|
10
|
+
TeamTask,
|
|
11
|
+
TaskAction,
|
|
12
|
+
DoneLogEntry,
|
|
13
|
+
TeamSuggestion,
|
|
14
|
+
SuggestionCategory,
|
|
15
|
+
SlotRole,
|
|
16
|
+
} from './board-types';
|
|
10
17
|
import { normalizeTitle, generateTaskId, generateSuggestionId } from './board-types';
|
|
11
18
|
|
|
12
19
|
// ── Task Operations ──
|
|
@@ -44,9 +51,14 @@ export function claimTask(
|
|
|
44
51
|
|
|
45
52
|
// Check dependencies — all must be done (not on the board)
|
|
46
53
|
if (task.dependsOn && task.dependsOn.length > 0) {
|
|
47
|
-
const pending = task.dependsOn.filter((depId) =>
|
|
54
|
+
const pending = task.dependsOn.filter((depId) =>
|
|
55
|
+
board.some((t) => t.id === depId && t.status !== 'done')
|
|
56
|
+
);
|
|
48
57
|
if (pending.length > 0) {
|
|
49
|
-
return {
|
|
58
|
+
return {
|
|
59
|
+
success: false,
|
|
60
|
+
error: `Blocked by ${pending.length} unfinished dependencies: ${pending.join(', ')}`,
|
|
61
|
+
};
|
|
50
62
|
}
|
|
51
63
|
}
|
|
52
64
|
|
|
@@ -62,7 +74,10 @@ export function completeTask(
|
|
|
62
74
|
taskId: string,
|
|
63
75
|
completedBy: string,
|
|
64
76
|
opts: { commit?: string; summary?: string } = {}
|
|
65
|
-
): {
|
|
77
|
+
): {
|
|
78
|
+
result: TaskActionResult & { onComplete?: TaskAction[]; unblocked?: string[] };
|
|
79
|
+
updatedBoard: TeamTask[];
|
|
80
|
+
} {
|
|
66
81
|
const task = board.find((t) => t.id === taskId);
|
|
67
82
|
if (!task) return { result: { success: false, error: 'Task not found' }, updatedBoard: board };
|
|
68
83
|
|
|
@@ -87,9 +102,11 @@ export function completeTask(
|
|
|
87
102
|
const dep = board.find((t) => t.id === depId);
|
|
88
103
|
if (!dep) continue;
|
|
89
104
|
// Check if ALL of dep's dependencies are now done (off the board or status=done)
|
|
90
|
-
const allDepsMet =
|
|
91
|
-
|
|
92
|
-
|
|
105
|
+
const allDepsMet =
|
|
106
|
+
!dep.dependsOn ||
|
|
107
|
+
dep.dependsOn.every(
|
|
108
|
+
(id) => id === taskId || !board.some((t) => t.id === id && t.status !== 'done')
|
|
109
|
+
);
|
|
93
110
|
if (allDepsMet && dep.status === 'blocked') {
|
|
94
111
|
dep.status = 'open';
|
|
95
112
|
unblocked.push(depId);
|
|
@@ -135,10 +152,15 @@ export function delegateTask(
|
|
|
135
152
|
taskId: string
|
|
136
153
|
): { result: TaskActionResult; updatedSource: TeamTask[]; updatedTarget: TeamTask[] } {
|
|
137
154
|
const task = sourceBoard.find((t) => t.id === taskId);
|
|
138
|
-
if (!task)
|
|
155
|
+
if (!task)
|
|
156
|
+
return {
|
|
157
|
+
result: { success: false, error: 'Task not found' },
|
|
158
|
+
updatedSource: sourceBoard,
|
|
159
|
+
updatedTarget: targetBoard,
|
|
160
|
+
};
|
|
139
161
|
|
|
140
162
|
const updatedSource = sourceBoard.filter((t) => t.id !== taskId);
|
|
141
|
-
|
|
163
|
+
|
|
142
164
|
// Clone task so it's fresh for the new board (unclaimed)
|
|
143
165
|
const delegatedTask: TeamTask = {
|
|
144
166
|
...task,
|
|
@@ -146,9 +168,13 @@ export function delegateTask(
|
|
|
146
168
|
claimedBy: undefined,
|
|
147
169
|
claimedByName: undefined,
|
|
148
170
|
};
|
|
149
|
-
|
|
171
|
+
|
|
150
172
|
targetBoard.push(delegatedTask);
|
|
151
|
-
return {
|
|
173
|
+
return {
|
|
174
|
+
result: { success: true, task: delegatedTask },
|
|
175
|
+
updatedSource,
|
|
176
|
+
updatedTarget: targetBoard,
|
|
177
|
+
};
|
|
152
178
|
}
|
|
153
179
|
|
|
154
180
|
/** Add tasks to a board with dedup against existing + done log. */
|
|
@@ -246,7 +272,8 @@ export function voteSuggestion(
|
|
|
246
272
|
): SuggestionActionResult {
|
|
247
273
|
const suggestion = suggestions.find((s) => s.id === suggestionId);
|
|
248
274
|
if (!suggestion) return { success: false, error: 'Suggestion not found' };
|
|
249
|
-
if (suggestion.status !== 'open')
|
|
275
|
+
if (suggestion.status !== 'open')
|
|
276
|
+
return { success: false, error: `Suggestion is ${suggestion.status}, voting closed` };
|
|
250
277
|
|
|
251
278
|
// Replace previous vote from same agent
|
|
252
279
|
suggestion.votes = suggestion.votes.filter((v) => v.agentId !== voterId);
|
|
@@ -273,7 +300,8 @@ export function voteSuggestion(
|
|
|
273
300
|
description: `${suggestion.description}\n\n[Auto-promoted from suggestion by ${suggestion.proposedByName} with ${suggestion.score} votes]`,
|
|
274
301
|
status: 'open',
|
|
275
302
|
source: `suggestion:${suggestion.id}`,
|
|
276
|
-
priority:
|
|
303
|
+
priority:
|
|
304
|
+
suggestion.category === 'architecture' ? 2 : suggestion.category === 'testing' ? 3 : 4,
|
|
277
305
|
createdAt: new Date().toISOString(),
|
|
278
306
|
};
|
|
279
307
|
board.push(promotedTask);
|
|
@@ -300,7 +328,8 @@ export function promoteSuggestion(
|
|
|
300
328
|
): SuggestionActionResult {
|
|
301
329
|
const suggestion = suggestions.find((s) => s.id === suggestionId);
|
|
302
330
|
if (!suggestion) return { success: false, error: 'Suggestion not found' };
|
|
303
|
-
if (suggestion.status !== 'open')
|
|
331
|
+
if (suggestion.status !== 'open')
|
|
332
|
+
return { success: false, error: `Suggestion is already ${suggestion.status}` };
|
|
304
333
|
|
|
305
334
|
suggestion.status = 'promoted';
|
|
306
335
|
suggestion.resolvedAt = new Date().toISOString();
|
|
@@ -328,7 +357,8 @@ export function dismissSuggestion(
|
|
|
328
357
|
): SuggestionActionResult {
|
|
329
358
|
const suggestion = suggestions.find((s) => s.id === suggestionId);
|
|
330
359
|
if (!suggestion) return { success: false, error: 'Suggestion not found' };
|
|
331
|
-
if (suggestion.status !== 'open')
|
|
360
|
+
if (suggestion.status !== 'open')
|
|
361
|
+
return { success: false, error: `Suggestion is already ${suggestion.status}` };
|
|
332
362
|
|
|
333
363
|
suggestion.status = 'dismissed';
|
|
334
364
|
suggestion.resolvedAt = new Date().toISOString();
|
package/src/board/board-types.ts
CHANGED
|
@@ -59,7 +59,14 @@ export interface DoneLogEntry {
|
|
|
59
59
|
|
|
60
60
|
// ── Suggestions ──
|
|
61
61
|
|
|
62
|
-
export type SuggestionCategory =
|
|
62
|
+
export type SuggestionCategory =
|
|
63
|
+
| 'process'
|
|
64
|
+
| 'tooling'
|
|
65
|
+
| 'architecture'
|
|
66
|
+
| 'testing'
|
|
67
|
+
| 'docs'
|
|
68
|
+
| 'performance'
|
|
69
|
+
| 'other';
|
|
63
70
|
|
|
64
71
|
export interface SuggestionVote {
|
|
65
72
|
agentId: string;
|
|
@@ -95,24 +102,42 @@ export interface RoomPreset {
|
|
|
95
102
|
|
|
96
103
|
export const ROOM_PRESETS: Record<string, RoomPreset> = {
|
|
97
104
|
audit: {
|
|
98
|
-
objective:
|
|
105
|
+
objective:
|
|
106
|
+
'Fix audit issues — split oversized components, add error handling, close security gaps, add tests',
|
|
99
107
|
taskSources: ['STUDIO_AUDIT.md'],
|
|
100
|
-
rules: [
|
|
108
|
+
rules: [
|
|
109
|
+
'Screenshot before and after visual changes',
|
|
110
|
+
'Run tsc --noEmit before committing',
|
|
111
|
+
'One task at a time',
|
|
112
|
+
],
|
|
101
113
|
},
|
|
102
114
|
research: {
|
|
103
|
-
objective:
|
|
115
|
+
objective:
|
|
116
|
+
'Compound knowledge — read research files, synthesize findings, contribute wisdom/patterns/gotchas',
|
|
104
117
|
taskSources: ['research/*.md', 'ROADMAP.md'],
|
|
105
|
-
rules: [
|
|
118
|
+
rules: [
|
|
119
|
+
'Query knowledge store before writing',
|
|
120
|
+
'Contribute findings to team workspace',
|
|
121
|
+
'Cite sources',
|
|
122
|
+
],
|
|
106
123
|
},
|
|
107
124
|
build: {
|
|
108
125
|
objective: 'Ship features — implement roadmap items, write code, add tests, deploy',
|
|
109
126
|
taskSources: ['ROADMAP.md', 'TODO.md'],
|
|
110
|
-
rules: [
|
|
127
|
+
rules: [
|
|
128
|
+
'Run tests before committing',
|
|
129
|
+
'Sectioned commits by scope',
|
|
130
|
+
'Update docs if adding public API',
|
|
131
|
+
],
|
|
111
132
|
},
|
|
112
133
|
review: {
|
|
113
134
|
objective: 'Quality gate — review recent changes, check for regressions, verify test coverage',
|
|
114
135
|
taskSources: ['git log --oneline -20'],
|
|
115
|
-
rules: [
|
|
136
|
+
rules: [
|
|
137
|
+
'Read the diff before commenting',
|
|
138
|
+
'Check test coverage',
|
|
139
|
+
'Verify no new console.log in production code',
|
|
140
|
+
],
|
|
116
141
|
},
|
|
117
142
|
};
|
|
118
143
|
|
|
@@ -142,23 +167,44 @@ export const BRITTNEY_AGENT: TeamAgentProfile = {
|
|
|
142
167
|
id: 'agent_brittney',
|
|
143
168
|
name: 'Brittney',
|
|
144
169
|
role: 'architect',
|
|
145
|
-
capabilities: [
|
|
170
|
+
capabilities: [
|
|
171
|
+
'scene-design',
|
|
172
|
+
'trait-composition',
|
|
173
|
+
'ux-critique',
|
|
174
|
+
'code-review',
|
|
175
|
+
'knowledge-synthesis',
|
|
176
|
+
],
|
|
146
177
|
model: 'claude-opus-4',
|
|
147
178
|
provider: 'anthropic',
|
|
148
179
|
claimFilter: { roles: ['coder', 'reviewer'], maxPriority: 5 },
|
|
149
|
-
systemPrompt:
|
|
150
|
-
|
|
180
|
+
systemPrompt:
|
|
181
|
+
'You are Brittney, the orchestrating AI for HoloScript team rooms. HoloScript is a knowledge compiler — users describe any system and it compiles to 37 targets. You scaffold projects, dispatch agents, compose traits, and select compilation targets. Simulation-first: digital twin before physical twin.',
|
|
182
|
+
knowledgeDomains: [
|
|
183
|
+
'rendering',
|
|
184
|
+
'compilation',
|
|
185
|
+
'agents',
|
|
186
|
+
'domain-modeling',
|
|
187
|
+
'semantic-platform',
|
|
188
|
+
'orchestration',
|
|
189
|
+
],
|
|
151
190
|
};
|
|
152
191
|
|
|
153
192
|
export const DAEMON_AGENT: TeamAgentProfile = {
|
|
154
193
|
id: 'agent_daemon',
|
|
155
194
|
name: 'Daemon',
|
|
156
195
|
role: 'coder',
|
|
157
|
-
capabilities: [
|
|
196
|
+
capabilities: [
|
|
197
|
+
'type-fixes',
|
|
198
|
+
'test-coverage',
|
|
199
|
+
'console-cleanup',
|
|
200
|
+
'todo-resolution',
|
|
201
|
+
'refactoring',
|
|
202
|
+
],
|
|
158
203
|
model: 'claude-sonnet-4',
|
|
159
204
|
provider: 'anthropic',
|
|
160
205
|
claimFilter: { roles: ['coder', 'tester'], maxPriority: 8 },
|
|
161
|
-
systemPrompt:
|
|
206
|
+
systemPrompt:
|
|
207
|
+
'You are Daemon, the code improvement agent. Fix TypeScript type errors, increase test coverage, remove stale console.log, resolve TODO/FIXME. Strict TypeScript: no `any` — use `unknown`. Run tests before marking done.',
|
|
162
208
|
knowledgeDomains: ['compilation', 'agents'],
|
|
163
209
|
};
|
|
164
210
|
|
|
@@ -166,11 +212,18 @@ export const ABSORB_AGENT: TeamAgentProfile = {
|
|
|
166
212
|
id: 'agent_absorb',
|
|
167
213
|
name: 'Absorb',
|
|
168
214
|
role: 'researcher',
|
|
169
|
-
capabilities: [
|
|
215
|
+
capabilities: [
|
|
216
|
+
'codebase-analysis',
|
|
217
|
+
'gap-detection',
|
|
218
|
+
'knowledge-extraction',
|
|
219
|
+
'pattern-mining',
|
|
220
|
+
'dependency-audit',
|
|
221
|
+
],
|
|
170
222
|
model: 'claude-sonnet-4',
|
|
171
223
|
provider: 'anthropic',
|
|
172
224
|
claimFilter: { roles: ['researcher'], maxPriority: 10 },
|
|
173
|
-
systemPrompt:
|
|
225
|
+
systemPrompt:
|
|
226
|
+
'You are Absorb, the knowledge extraction agent. Scan codebases, detect gaps, extract W/P/G entries. Use absorb_query and absorb_run_absorb. Deduplicate against existing knowledge. Focus on actionable insights.',
|
|
174
227
|
knowledgeDomains: ['compilation', 'security', 'rendering', 'agents', 'general'],
|
|
175
228
|
};
|
|
176
229
|
|
|
@@ -178,11 +231,18 @@ export const ORACLE_AGENT: TeamAgentProfile = {
|
|
|
178
231
|
id: 'agent_oracle',
|
|
179
232
|
name: 'Oracle',
|
|
180
233
|
role: 'reviewer',
|
|
181
|
-
capabilities: [
|
|
234
|
+
capabilities: [
|
|
235
|
+
'architectural-review',
|
|
236
|
+
'consistency-checking',
|
|
237
|
+
'knowledge-cross-reference',
|
|
238
|
+
'regression-detection',
|
|
239
|
+
'standard-enforcement',
|
|
240
|
+
],
|
|
182
241
|
model: 'claude-opus-4',
|
|
183
242
|
provider: 'anthropic',
|
|
184
243
|
claimFilter: { roles: ['reviewer'], maxPriority: 5 },
|
|
185
|
-
systemPrompt:
|
|
244
|
+
systemPrompt:
|
|
245
|
+
'You are Oracle, the quality reviewer. Cross-reference knowledge store for related W/P/G. Check architectural consistency, test coverage, no hardcoded domain vocabulary in core, proper trait composition. Flag regressions.',
|
|
186
246
|
knowledgeDomains: ['security', 'compilation', 'agents'],
|
|
187
247
|
};
|
|
188
248
|
|
|
@@ -213,7 +273,11 @@ export function getProfilesByDomain(domain: string): TeamAgentProfile[] {
|
|
|
213
273
|
|
|
214
274
|
/** Normalize a title for dedup comparison. */
|
|
215
275
|
export function normalizeTitle(s: string): string {
|
|
216
|
-
return s
|
|
276
|
+
return s
|
|
277
|
+
.toLowerCase()
|
|
278
|
+
.replace(/[^a-z0-9]+/g, ' ')
|
|
279
|
+
.trim()
|
|
280
|
+
.slice(0, 60);
|
|
217
281
|
}
|
|
218
282
|
|
|
219
283
|
/** Generate a unique task ID. */
|
|
@@ -236,7 +300,10 @@ export function inferFixPriority(kind: string, text: string): number {
|
|
|
236
300
|
}
|
|
237
301
|
|
|
238
302
|
/** Parse a derive source (markdown, grep output) into task candidates. */
|
|
239
|
-
export function parseDeriveContent(
|
|
303
|
+
export function parseDeriveContent(
|
|
304
|
+
content: string,
|
|
305
|
+
source: string
|
|
306
|
+
): Array<Omit<TeamTask, 'id' | 'status' | 'createdAt'>> {
|
|
240
307
|
const lines = content.split('\n');
|
|
241
308
|
const tasks: Array<Omit<TeamTask, 'id' | 'status' | 'createdAt'>> = [];
|
|
242
309
|
const seen = new Set<string>();
|
|
@@ -273,14 +340,21 @@ export function parseDeriveContent(content: string, source: string): Array<Omit<
|
|
|
273
340
|
}
|
|
274
341
|
|
|
275
342
|
// grep-style: path:line: // TODO: message
|
|
276
|
-
const grepMatch = trimmed.match(
|
|
343
|
+
const grepMatch = trimmed.match(
|
|
344
|
+
/^(.+?):(\d+):\s*(?:\/\/\s*)?(TODO|FIXME|HACK|XXX)\s*:?\s*(.+)$/i
|
|
345
|
+
);
|
|
277
346
|
if (grepMatch) {
|
|
278
347
|
const [, file, lineNo, kind, detail] = grepMatch;
|
|
279
348
|
const title = `${kind.toUpperCase()}: ${detail.trim().slice(0, 180)}`;
|
|
280
349
|
const norm = normalizeTitle(title);
|
|
281
350
|
if (!seen.has(norm)) {
|
|
282
351
|
seen.add(norm);
|
|
283
|
-
tasks.push({
|
|
352
|
+
tasks.push({
|
|
353
|
+
title,
|
|
354
|
+
description: `${file}:${lineNo}`,
|
|
355
|
+
priority: inferFixPriority(kind, detail),
|
|
356
|
+
source,
|
|
357
|
+
});
|
|
284
358
|
}
|
|
285
359
|
continue;
|
|
286
360
|
}
|
package/src/delegation.ts
CHANGED
|
@@ -222,7 +222,7 @@ export class DelegationManager {
|
|
|
222
222
|
chain,
|
|
223
223
|
reason: result.accepted
|
|
224
224
|
? `Delegated to "${targetTeamId}" (remote task: ${result.taskId})`
|
|
225
|
-
: result.reason ?? 'Target team rejected the task',
|
|
225
|
+
: (result.reason ?? 'Target team rejected the task'),
|
|
226
226
|
};
|
|
227
227
|
}
|
|
228
228
|
|
|
@@ -253,13 +253,15 @@ export class DelegationManager {
|
|
|
253
253
|
* Get all delegations from this team.
|
|
254
254
|
*/
|
|
255
255
|
getOutboundDelegations(): DelegationRecord[] {
|
|
256
|
-
return [...this.delegations.values()].filter(d => d.fromTeam === this.teamId);
|
|
256
|
+
return [...this.delegations.values()].filter((d) => d.fromTeam === this.teamId);
|
|
257
257
|
}
|
|
258
258
|
|
|
259
259
|
/**
|
|
260
260
|
* Get pending delegations.
|
|
261
261
|
*/
|
|
262
262
|
getPendingDelegations(): DelegationRecord[] {
|
|
263
|
-
return [...this.delegations.values()].filter(
|
|
263
|
+
return [...this.delegations.values()].filter(
|
|
264
|
+
(d) => d.status === 'pending' || d.status === 'accepted'
|
|
265
|
+
);
|
|
264
266
|
}
|
|
265
267
|
}
|
|
@@ -133,11 +133,22 @@ export class DistributedClaimer {
|
|
|
133
133
|
};
|
|
134
134
|
this.claims.set(taskId, record);
|
|
135
135
|
this.broadcastClaim('claim', record);
|
|
136
|
-
return {
|
|
136
|
+
return {
|
|
137
|
+
success: true,
|
|
138
|
+
taskId,
|
|
139
|
+
claimedBy: agentId,
|
|
140
|
+
claimTimestamp: timestamp,
|
|
141
|
+
contested: [loser],
|
|
142
|
+
};
|
|
137
143
|
}
|
|
138
144
|
|
|
139
145
|
// Lost the conflict
|
|
140
|
-
return {
|
|
146
|
+
return {
|
|
147
|
+
success: false,
|
|
148
|
+
taskId,
|
|
149
|
+
claimedBy: existing.agentId,
|
|
150
|
+
claimTimestamp: existing.timestamp,
|
|
151
|
+
};
|
|
141
152
|
}
|
|
142
153
|
|
|
143
154
|
/**
|