@holoscript/framework 6.0.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.
- package/ALL-test-results.json +1 -0
- package/CHANGELOG.md +8 -0
- package/LICENSE +21 -0
- package/ROADMAP.md +175 -0
- package/dist/AgentManifest-CB4xM-Ma.d.cts +704 -0
- package/dist/AgentManifest-CB4xM-Ma.d.ts +704 -0
- package/dist/BehaviorTree-BrBFECv5.d.cts +103 -0
- package/dist/BehaviorTree-BrBFECv5.d.ts +103 -0
- package/dist/InvisibleWallet-BB6tFvRA.d.cts +1732 -0
- package/dist/InvisibleWallet-rtRrBOA8.d.ts +1732 -0
- package/dist/OrchestratorAgent-BvWgf9uw.d.cts +798 -0
- package/dist/OrchestratorAgent-Q_CbVTmO.d.ts +798 -0
- package/dist/agents/index.cjs +4790 -0
- package/dist/agents/index.d.cts +1788 -0
- package/dist/agents/index.d.ts +1788 -0
- package/dist/agents/index.js +4695 -0
- package/dist/ai/index.cjs +5347 -0
- package/dist/ai/index.d.cts +1753 -0
- package/dist/ai/index.d.ts +1753 -0
- package/dist/ai/index.js +5244 -0
- package/dist/behavior.cjs +449 -0
- package/dist/behavior.d.cts +130 -0
- package/dist/behavior.d.ts +130 -0
- package/dist/behavior.js +407 -0
- package/dist/economy/index.cjs +3659 -0
- package/dist/economy/index.d.cts +747 -0
- package/dist/economy/index.d.ts +747 -0
- package/dist/economy/index.js +3617 -0
- package/dist/implementations-D9T3un9D.d.cts +236 -0
- package/dist/implementations-D9T3un9D.d.ts +236 -0
- package/dist/index.cjs +24550 -0
- package/dist/index.d.cts +1729 -0
- package/dist/index.d.ts +1729 -0
- package/dist/index.js +24277 -0
- package/dist/learning/index.cjs +219 -0
- package/dist/learning/index.d.cts +104 -0
- package/dist/learning/index.d.ts +104 -0
- package/dist/learning/index.js +189 -0
- package/dist/negotiation/index.cjs +970 -0
- package/dist/negotiation/index.d.cts +610 -0
- package/dist/negotiation/index.d.ts +610 -0
- package/dist/negotiation/index.js +931 -0
- package/dist/skills/index.cjs +1118 -0
- package/dist/skills/index.d.cts +289 -0
- package/dist/skills/index.d.ts +289 -0
- package/dist/skills/index.js +1079 -0
- package/dist/swarm/index.cjs +5268 -0
- package/dist/swarm/index.d.cts +2433 -0
- package/dist/swarm/index.d.ts +2433 -0
- package/dist/swarm/index.js +5221 -0
- package/dist/training/index.cjs +2745 -0
- package/dist/training/index.d.cts +1734 -0
- package/dist/training/index.d.ts +1734 -0
- package/dist/training/index.js +2687 -0
- package/extract-failures.js +10 -0
- package/package.json +82 -0
- package/src/__tests__/bounty-marketplace.test.ts +374 -0
- package/src/__tests__/delegation.test.ts +144 -0
- package/src/__tests__/distributed-claimer.test.ts +147 -0
- package/src/__tests__/done-log-audit.test.ts +342 -0
- package/src/__tests__/framework.test.ts +865 -0
- package/src/__tests__/goal-synthesizer.test.ts +236 -0
- package/src/__tests__/presence.test.ts +223 -0
- package/src/__tests__/protocol-agent.test.ts +254 -0
- package/src/__tests__/revenue-splitter.test.ts +114 -0
- package/src/__tests__/scenario-driven-todo.test.ts +197 -0
- package/src/__tests__/self-improve.test.ts +349 -0
- package/src/__tests__/service-lifecycle.test.ts +237 -0
- package/src/__tests__/skill-router.test.ts +121 -0
- package/src/agents/AgentManifest.ts +493 -0
- package/src/agents/AgentRegistry.ts +475 -0
- package/src/agents/AgentTypes.ts +585 -0
- package/src/agents/AgentWalletRegistry.ts +83 -0
- package/src/agents/AuthenticatedCRDT.ts +388 -0
- package/src/agents/CapabilityMatcher.ts +453 -0
- package/src/agents/CrossRealityHandoff.ts +305 -0
- package/src/agents/CulturalMemory.ts +454 -0
- package/src/agents/FederatedRegistryAdapter.ts +429 -0
- package/src/agents/NormEngine.ts +450 -0
- package/src/agents/OrchestratorAgent.ts +414 -0
- package/src/agents/SkillWorkflowEngine.ts +472 -0
- package/src/agents/TaskDelegationService.ts +551 -0
- package/src/agents/__tests__/AgentManifest.prod.test.ts +134 -0
- package/src/agents/__tests__/AgentManifest.test.ts +182 -0
- package/src/agents/__tests__/AgentModule.test.ts +864 -0
- package/src/agents/__tests__/AgentRegistry.prod.test.ts +125 -0
- package/src/agents/__tests__/AgentRegistry.test.ts +148 -0
- package/src/agents/__tests__/AgentTypes.test.ts +534 -0
- package/src/agents/__tests__/AgentWalletRegistry.test.ts +152 -0
- package/src/agents/__tests__/AuthenticatedCRDT.test.ts +558 -0
- package/src/agents/__tests__/CapabilityMatcher.prod.test.ts +117 -0
- package/src/agents/__tests__/CapabilityMatcher.test.ts +178 -0
- package/src/agents/__tests__/CrossRealityHandoff.test.ts +402 -0
- package/src/agents/__tests__/CulturalMemory.test.ts +200 -0
- package/src/agents/__tests__/FederatedRegistryAdapter.test.ts +409 -0
- package/src/agents/__tests__/NormEngine.test.ts +276 -0
- package/src/agents/__tests__/OrchestratorAgent.test.ts +182 -0
- package/src/agents/__tests__/SkillWorkflowEngine.test.ts +357 -0
- package/src/agents/__tests__/TaskDelegationService.test.ts +446 -0
- package/src/agents/index.ts +107 -0
- package/src/agents/spatial-comms/Layer1RealTime.ts +621 -0
- package/src/agents/spatial-comms/Layer2A2A.ts +661 -0
- package/src/agents/spatial-comms/Layer3MCP.ts +651 -0
- package/src/agents/spatial-comms/ProtocolTypes.ts +543 -0
- package/src/agents/spatial-comms/SpatialCommClient.ts +483 -0
- package/src/agents/spatial-comms/__tests__/performance-benchmark.test.ts +465 -0
- package/src/agents/spatial-comms/examples/multi-agent-world-creation.ts +409 -0
- package/src/agents/spatial-comms/index.ts +66 -0
- package/src/ai/AIAdapter.ts +313 -0
- package/src/ai/AICopilot.ts +331 -0
- package/src/ai/AIOutputValidator.ts +203 -0
- package/src/ai/BTNodes.ts +239 -0
- package/src/ai/BehaviorSelector.ts +135 -0
- package/src/ai/BehaviorTree.ts +153 -0
- package/src/ai/Blackboard.ts +165 -0
- package/src/ai/GenerationAnalytics.ts +461 -0
- package/src/ai/GenerationCache.ts +265 -0
- package/src/ai/GoalPlanner.ts +165 -0
- package/src/ai/HoloScriptGenerator.ts +580 -0
- package/src/ai/InfluenceMap.ts +180 -0
- package/src/ai/NavMesh.ts +168 -0
- package/src/ai/PerceptionSystem.ts +178 -0
- package/src/ai/PromptTemplates.ts +453 -0
- package/src/ai/SemanticSearchService.ts +80 -0
- package/src/ai/StateMachine.ts +196 -0
- package/src/ai/SteeringBehavior.ts +150 -0
- package/src/ai/SteeringBehaviors.ts +244 -0
- package/src/ai/TrainingDataGenerator.ts +1082 -0
- package/src/ai/UtilityAI.ts +145 -0
- package/src/ai/__tests__/AIAdapter.prod.test.ts +259 -0
- package/src/ai/__tests__/AIAdapter.test.ts +109 -0
- package/src/ai/__tests__/AICopilot.prod.test.ts +341 -0
- package/src/ai/__tests__/AICopilot.test.ts +178 -0
- package/src/ai/__tests__/AIOutputValidator.prod.test.ts +226 -0
- package/src/ai/__tests__/AIOutputValidator.test.ts +138 -0
- package/src/ai/__tests__/BTNodes.prod.test.ts +391 -0
- package/src/ai/__tests__/BTNodes.test.ts +263 -0
- package/src/ai/__tests__/BehaviorSelector.prod.test.ts +129 -0
- package/src/ai/__tests__/BehaviorSelector.test.ts +132 -0
- package/src/ai/__tests__/BehaviorTree.prod.test.ts +266 -0
- package/src/ai/__tests__/BehaviorTree.test.ts +216 -0
- package/src/ai/__tests__/Blackboard.prod.test.ts +339 -0
- package/src/ai/__tests__/Blackboard.test.ts +183 -0
- package/src/ai/__tests__/GenerationAnalytics.prod.test.ts +141 -0
- package/src/ai/__tests__/GenerationAnalytics.test.ts +165 -0
- package/src/ai/__tests__/GenerationCache.prod.test.ts +144 -0
- package/src/ai/__tests__/GenerationCache.test.ts +171 -0
- package/src/ai/__tests__/GoalPlanner.prod.test.ts +189 -0
- package/src/ai/__tests__/GoalPlanner.test.ts +137 -0
- package/src/ai/__tests__/GoalPlannerDepth.prod.test.ts +217 -0
- package/src/ai/__tests__/HoloScriptGenerator.test.ts +125 -0
- package/src/ai/__tests__/InfluenceMap.prod.test.ts +146 -0
- package/src/ai/__tests__/InfluenceMap.test.ts +149 -0
- package/src/ai/__tests__/NavMesh.prod.test.ts +141 -0
- package/src/ai/__tests__/NavMesh.test.ts +159 -0
- package/src/ai/__tests__/PerceptionSystem.prod.test.ts +135 -0
- package/src/ai/__tests__/PerceptionSystem.test.ts +250 -0
- package/src/ai/__tests__/PromptTemplates.prod.test.ts +313 -0
- package/src/ai/__tests__/PromptTemplates.test.ts +146 -0
- package/src/ai/__tests__/SemanticSearch.test.ts +37 -0
- package/src/ai/__tests__/StateMachine.prod.test.ts +162 -0
- package/src/ai/__tests__/StateMachine.test.ts +163 -0
- package/src/ai/__tests__/SteeringBehavior.prod.test.ts +251 -0
- package/src/ai/__tests__/SteeringBehavior.test.ts +135 -0
- package/src/ai/__tests__/SteeringBehaviors.prod.test.ts +133 -0
- package/src/ai/__tests__/SteeringBehaviors.test.ts +151 -0
- package/src/ai/__tests__/TrainingDataGenerator.prod.test.ts +286 -0
- package/src/ai/__tests__/TrainingDataGenerator.test.ts +286 -0
- package/src/ai/__tests__/UtilityAI.prod.test.ts +207 -0
- package/src/ai/__tests__/UtilityAI.test.ts +155 -0
- package/src/ai/__tests__/adapters.prod.test.ts +263 -0
- package/src/ai/__tests__/adapters.test.ts +320 -0
- package/src/ai/adapters.ts +1585 -0
- package/src/ai/index.ts +130 -0
- package/src/behavior/BehaviorPresets.ts +140 -0
- package/src/behavior/BehaviorTree.ts +236 -0
- package/src/behavior/StateMachine.ts +176 -0
- package/src/behavior/StateTrait.ts +67 -0
- package/src/behavior/index.ts +8 -0
- package/src/behavior.ts +8 -0
- package/src/board/audit.ts +284 -0
- package/src/board/board-ops.ts +336 -0
- package/src/board/board-types.ts +302 -0
- package/src/board/index.ts +69 -0
- package/src/define-agent.ts +46 -0
- package/src/define-team.ts +33 -0
- package/src/delegation.ts +265 -0
- package/src/distributed-claimer.ts +228 -0
- package/src/economy/AgentBudgetEnforcer.ts +464 -0
- package/src/economy/BountyManager.ts +185 -0
- package/src/economy/CreatorRevenueAggregator.ts +460 -0
- package/src/economy/InvisibleWallet.ts +82 -0
- package/src/economy/KnowledgeMarketplace.ts +193 -0
- package/src/economy/PaymentWebhookService.ts +512 -0
- package/src/economy/RevenueSplitter.ts +156 -0
- package/src/economy/SubscriptionManager.ts +546 -0
- package/src/economy/UnifiedBudgetOptimizer.ts +635 -0
- package/src/economy/UsageMeter.ts +440 -0
- package/src/economy/_core-stubs.ts +219 -0
- package/src/economy/index.ts +100 -0
- package/src/economy/x402-facilitator.ts +1978 -0
- package/src/index.ts +348 -0
- package/src/knowledge/__tests__/knowledge-consolidator.test.ts +444 -0
- package/src/knowledge/__tests__/knowledge-store-vector.test.ts +291 -0
- package/src/knowledge/brain.ts +167 -0
- package/src/knowledge/consolidation.ts +581 -0
- package/src/knowledge/knowledge-consolidator.ts +510 -0
- package/src/knowledge/knowledge-store.ts +616 -0
- package/src/learning/MemoryConsolidator.ts +102 -0
- package/src/learning/MemoryScorer.ts +69 -0
- package/src/learning/ProceduralCompiler.ts +45 -0
- package/src/learning/SemanticClusterer.ts +66 -0
- package/src/learning/index.ts +8 -0
- package/src/llm/llm-adapter.ts +159 -0
- package/src/mesh/index.ts +309 -0
- package/src/negotiation/NegotiationProtocol.ts +694 -0
- package/src/negotiation/NegotiationTypes.ts +473 -0
- package/src/negotiation/VotingMechanisms.ts +691 -0
- package/src/negotiation/index.ts +49 -0
- package/src/protocol/goal-synthesizer.ts +317 -0
- package/src/protocol/implementations.ts +474 -0
- package/src/protocol/micro-phase-decomposer.ts +299 -0
- package/src/protocol/micro-step-decomposer.test.ts +306 -0
- package/src/protocol-agent.test.ts +353 -0
- package/src/protocol-agent.ts +670 -0
- package/src/self-improve/absorb-scanner.ts +252 -0
- package/src/self-improve/evolution-engine.ts +149 -0
- package/src/self-improve/framework-absorber.ts +214 -0
- package/src/self-improve/index.ts +50 -0
- package/src/self-improve/prompt-optimizer.ts +212 -0
- package/src/self-improve/test-generator.ts +175 -0
- package/src/skill-router.ts +186 -0
- package/src/skills/index.ts +5 -0
- package/src/skills/skill-md-bridge.ts +1699 -0
- package/src/swarm/ACOEngine.ts +261 -0
- package/src/swarm/CollectiveIntelligence.ts +383 -0
- package/src/swarm/ContributionSynthesizer.ts +481 -0
- package/src/swarm/LeaderElection.ts +393 -0
- package/src/swarm/PSOEngine.ts +206 -0
- package/src/swarm/QuorumPolicy.ts +173 -0
- package/src/swarm/SwarmCoordinator.ts +335 -0
- package/src/swarm/SwarmManager.ts +442 -0
- package/src/swarm/SwarmMembership.ts +456 -0
- package/src/swarm/VotingRound.ts +255 -0
- package/src/swarm/__tests__/ACOEngine.prod.test.ts +164 -0
- package/src/swarm/__tests__/ACOEngine.test.ts +117 -0
- package/src/swarm/__tests__/CollectiveIntelligence.prod.test.ts +296 -0
- package/src/swarm/__tests__/CollectiveIntelligence.test.ts +457 -0
- package/src/swarm/__tests__/ContributionSynthesizer.prod.test.ts +269 -0
- package/src/swarm/__tests__/ContributionSynthesizer.test.ts +254 -0
- package/src/swarm/__tests__/LeaderElection.prod.test.ts +196 -0
- package/src/swarm/__tests__/LeaderElection.test.ts +151 -0
- package/src/swarm/__tests__/PSOEngine.prod.test.ts +162 -0
- package/src/swarm/__tests__/PSOEngine.test.ts +106 -0
- package/src/swarm/__tests__/QuorumPolicy.prod.test.ts +216 -0
- package/src/swarm/__tests__/QuorumPolicy.test.ts +177 -0
- package/src/swarm/__tests__/SwarmCoordinator.prod.test.ts +186 -0
- package/src/swarm/__tests__/SwarmCoordinator.test.ts +167 -0
- package/src/swarm/__tests__/SwarmManager.prod.test.ts +308 -0
- package/src/swarm/__tests__/SwarmManager.test.ts +373 -0
- package/src/swarm/__tests__/SwarmMembership.prod.test.ts +273 -0
- package/src/swarm/__tests__/SwarmMembership.test.ts +264 -0
- package/src/swarm/__tests__/VotingRound.prod.test.ts +233 -0
- package/src/swarm/__tests__/VotingRound.test.ts +174 -0
- package/src/swarm/analytics/SwarmInspector.ts +476 -0
- package/src/swarm/analytics/SwarmMetrics.ts +449 -0
- package/src/swarm/analytics/__tests__/SwarmInspector.prod.test.ts +366 -0
- package/src/swarm/analytics/__tests__/SwarmInspector.test.ts +454 -0
- package/src/swarm/analytics/__tests__/SwarmMetrics.prod.test.ts +254 -0
- package/src/swarm/analytics/__tests__/SwarmMetrics.test.ts +370 -0
- package/src/swarm/analytics/index.ts +7 -0
- package/src/swarm/index.ts +69 -0
- package/src/swarm/messaging/BroadcastChannel.ts +509 -0
- package/src/swarm/messaging/GossipProtocol.ts +565 -0
- package/src/swarm/messaging/SwarmEventBus.ts +443 -0
- package/src/swarm/messaging/__tests__/BroadcastChannel.prod.test.ts +331 -0
- package/src/swarm/messaging/__tests__/BroadcastChannel.test.ts +333 -0
- package/src/swarm/messaging/__tests__/GossipProtocol.prod.test.ts +356 -0
- package/src/swarm/messaging/__tests__/GossipProtocol.test.ts +437 -0
- package/src/swarm/messaging/__tests__/SwarmEventBus.prod.test.ts +191 -0
- package/src/swarm/messaging/__tests__/SwarmEventBus.test.ts +247 -0
- package/src/swarm/messaging/index.ts +8 -0
- package/src/swarm/spatial/FlockingBehavior.ts +462 -0
- package/src/swarm/spatial/FormationController.ts +500 -0
- package/src/swarm/spatial/Vector3.ts +170 -0
- package/src/swarm/spatial/ZoneClaiming.ts +509 -0
- package/src/swarm/spatial/__tests__/FlockingBehavior.prod.test.ts +239 -0
- package/src/swarm/spatial/__tests__/FlockingBehavior.test.ts +298 -0
- package/src/swarm/spatial/__tests__/FormationController.prod.test.ts +240 -0
- package/src/swarm/spatial/__tests__/FormationController.test.ts +297 -0
- package/src/swarm/spatial/__tests__/Vector3.prod.test.ts +283 -0
- package/src/swarm/spatial/__tests__/Vector3.test.ts +224 -0
- package/src/swarm/spatial/__tests__/ZoneClaiming.prod.test.ts +246 -0
- package/src/swarm/spatial/__tests__/ZoneClaiming.test.ts +374 -0
- package/src/swarm/spatial/index.ts +28 -0
- package/src/team.ts +1245 -0
- package/src/training/LRScheduler.ts +377 -0
- package/src/training/QualityScoringPipeline.ts +139 -0
- package/src/training/SoftDedup.ts +461 -0
- package/src/training/SparsityMonitor.ts +685 -0
- package/src/training/SparsityMonitorTypes.ts +209 -0
- package/src/training/SpatialTrainingDataGenerator.ts +1526 -0
- package/src/training/SpatialTrainingDataTypes.ts +216 -0
- package/src/training/TrainingPipelineConfig.ts +215 -0
- package/src/training/constants.ts +94 -0
- package/src/training/index.ts +138 -0
- package/src/training/schema.ts +147 -0
- package/src/training/scripts/generate-novel-use-cases-dataset.ts +272 -0
- package/src/training/scripts/generate-spatial-dataset.ts +521 -0
- package/src/training/training/data/novel-use-cases.jsonl +153 -0
- package/src/training/training/data/spatial-reasoning-10k.jsonl +9354 -0
- package/src/training/trainingmonkey/TrainingMonkeyIntegration.ts +477 -0
- package/src/training/trainingmonkey/TrainingMonkeyTypes.ts +230 -0
- package/src/training/trainingmonkey/index.ts +26 -0
- package/src/training/trait-mappings.ts +157 -0
- package/src/types/core-stubs.d.ts +113 -0
- package/src/types.ts +304 -0
- package/test-output.txt +0 -0
- package/test-result.json +1 -0
- package/tsc-errors.txt +4 -0
- package/tsc_output.txt +0 -0
- package/tsconfig.json +14 -0
- package/tsup-learning-esm.config.ts +12 -0
- package/tsup.config.ts +21 -0
- package/typescript-errors-2.txt +0 -0
- package/typescript-errors.txt +22 -0
- package/vitest-log-utf8.txt +268 -0
- package/vitest-log.txt +0 -0
- package/vitest.config.ts +8 -0
|
@@ -0,0 +1,704 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @holoscript/core - Agent Type Definitions
|
|
3
|
+
*
|
|
4
|
+
* Shared types for the HoloScript Agent Framework.
|
|
5
|
+
* Defines the 7-phase uAA2++ protocol and agent capabilities.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* The 7 phases of the uAA2++ protocol
|
|
9
|
+
*/
|
|
10
|
+
type AgentPhase = 'INTAKE' | 'REFLECT' | 'EXECUTE' | 'COMPRESS' | 'REINTAKE' | 'GROW' | 'EVOLVE';
|
|
11
|
+
/**
|
|
12
|
+
* Phase execution order
|
|
13
|
+
*/
|
|
14
|
+
declare const PHASE_ORDER: readonly AgentPhase[];
|
|
15
|
+
/**
|
|
16
|
+
* Default phase timings (milliseconds)
|
|
17
|
+
*/
|
|
18
|
+
declare const DEFAULT_PHASE_TIMINGS: Record<AgentPhase, number>;
|
|
19
|
+
/**
|
|
20
|
+
* Base result for all phases
|
|
21
|
+
*/
|
|
22
|
+
interface PhaseResult {
|
|
23
|
+
success: boolean;
|
|
24
|
+
phase: AgentPhase;
|
|
25
|
+
duration_ms: number;
|
|
26
|
+
error?: string;
|
|
27
|
+
data?: Record<string, unknown>;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* INTAKE phase result
|
|
31
|
+
*/
|
|
32
|
+
interface IntakeResult extends PhaseResult {
|
|
33
|
+
phase: 'INTAKE';
|
|
34
|
+
sources: string[];
|
|
35
|
+
items_loaded: number;
|
|
36
|
+
data?: {
|
|
37
|
+
knowledge?: Record<string, unknown>;
|
|
38
|
+
patterns?: unknown[];
|
|
39
|
+
wisdom?: unknown[];
|
|
40
|
+
gotchas?: unknown[];
|
|
41
|
+
context?: Record<string, unknown>;
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* REFLECT phase result
|
|
46
|
+
*/
|
|
47
|
+
interface ReflectResult extends PhaseResult {
|
|
48
|
+
phase: 'REFLECT';
|
|
49
|
+
analysis_depth: 'shallow' | 'medium' | 'deep';
|
|
50
|
+
insights_generated: number;
|
|
51
|
+
data?: {
|
|
52
|
+
ai_context?: string;
|
|
53
|
+
decision_criteria?: Record<string, unknown>;
|
|
54
|
+
priorities?: string[];
|
|
55
|
+
risks?: string[];
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* EXECUTE phase result
|
|
60
|
+
*/
|
|
61
|
+
interface ExecuteResult extends PhaseResult {
|
|
62
|
+
phase: 'EXECUTE';
|
|
63
|
+
actions_taken: number;
|
|
64
|
+
deliverables: string[];
|
|
65
|
+
data?: {
|
|
66
|
+
outputs?: unknown[];
|
|
67
|
+
side_effects?: string[];
|
|
68
|
+
metrics?: Record<string, number>;
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* COMPRESS phase result
|
|
73
|
+
*/
|
|
74
|
+
interface CompressResult extends PhaseResult {
|
|
75
|
+
phase: 'COMPRESS';
|
|
76
|
+
compression_ratio: number;
|
|
77
|
+
tokens_saved: number;
|
|
78
|
+
data?: {
|
|
79
|
+
compressed_knowledge?: string;
|
|
80
|
+
symbol_mappings?: Record<string, string>;
|
|
81
|
+
patterns_extracted?: string[];
|
|
82
|
+
wisdom_extracted?: string[];
|
|
83
|
+
gotchas_captured?: string[];
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* REINTAKE phase result
|
|
88
|
+
*/
|
|
89
|
+
interface ReintakeResult extends PhaseResult {
|
|
90
|
+
phase: 'REINTAKE';
|
|
91
|
+
items_refreshed: number;
|
|
92
|
+
effectiveness: number;
|
|
93
|
+
data?: {
|
|
94
|
+
merged_knowledge?: Record<string, unknown>;
|
|
95
|
+
conflicts_resolved?: number;
|
|
96
|
+
new_insights?: string[];
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* GROW phase result
|
|
101
|
+
*/
|
|
102
|
+
interface GrowResult extends PhaseResult {
|
|
103
|
+
phase: 'GROW';
|
|
104
|
+
patterns_learned: number;
|
|
105
|
+
wisdom_gained: number;
|
|
106
|
+
gotchas_captured: number;
|
|
107
|
+
data?: {
|
|
108
|
+
new_patterns?: Array<{
|
|
109
|
+
id: string;
|
|
110
|
+
name: string;
|
|
111
|
+
confidence: number;
|
|
112
|
+
}>;
|
|
113
|
+
new_wisdom?: Array<{
|
|
114
|
+
id: string;
|
|
115
|
+
content: string;
|
|
116
|
+
domain: string;
|
|
117
|
+
}>;
|
|
118
|
+
new_gotchas?: Array<{
|
|
119
|
+
id: string;
|
|
120
|
+
trigger: string;
|
|
121
|
+
avoidance: string;
|
|
122
|
+
}>;
|
|
123
|
+
capability_score_delta?: number;
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* EVOLVE phase result
|
|
128
|
+
*/
|
|
129
|
+
interface EvolveResult extends PhaseResult {
|
|
130
|
+
phase: 'EVOLVE';
|
|
131
|
+
evolution_level: number;
|
|
132
|
+
traits_activated: string[];
|
|
133
|
+
traits_deactivated: string[];
|
|
134
|
+
data?: {
|
|
135
|
+
new_capabilities?: string[];
|
|
136
|
+
optimizations_applied?: string[];
|
|
137
|
+
efficiency_improvement?: number;
|
|
138
|
+
next_evolution_threshold?: number;
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Union type for all phase results
|
|
143
|
+
*/
|
|
144
|
+
type AnyPhaseResult = IntakeResult | ReflectResult | ExecuteResult | CompressResult | ReintakeResult | GrowResult | EvolveResult;
|
|
145
|
+
/**
|
|
146
|
+
* Complete cycle result
|
|
147
|
+
*/
|
|
148
|
+
interface CycleResult {
|
|
149
|
+
cycle_number: number;
|
|
150
|
+
success: boolean;
|
|
151
|
+
total_duration_ms: number;
|
|
152
|
+
phases: {
|
|
153
|
+
intake?: IntakeResult;
|
|
154
|
+
reflect?: ReflectResult;
|
|
155
|
+
execute?: ExecuteResult;
|
|
156
|
+
compress?: CompressResult;
|
|
157
|
+
reintake?: ReintakeResult;
|
|
158
|
+
grow?: GrowResult;
|
|
159
|
+
evolve?: EvolveResult;
|
|
160
|
+
};
|
|
161
|
+
learnings: {
|
|
162
|
+
patterns: number;
|
|
163
|
+
wisdom: number;
|
|
164
|
+
gotchas: number;
|
|
165
|
+
};
|
|
166
|
+
evolution_delta: number;
|
|
167
|
+
timestamp: string;
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Agent category classification
|
|
171
|
+
*/
|
|
172
|
+
type AgentCategory = 'trading' | 'analysis' | 'optimization' | 'monitoring' | 'creative' | 'management' | 'strategic' | 'assistant' | 'orchestrator' | 'quest_creator' | 'librarian' | 'twin_manager' | 'payment_handler' | 'autonomous';
|
|
173
|
+
/**
|
|
174
|
+
* Agent position in the Lotus Flower Architecture
|
|
175
|
+
*/
|
|
176
|
+
type AgentPosition = 'center' | 'inner-circle' | 'main-petal' | 'inner-petal' | 'supportive' | 'background' | 'infrastructure';
|
|
177
|
+
/**
|
|
178
|
+
* Agent orchestral section (musical metaphor)
|
|
179
|
+
*/
|
|
180
|
+
type AgentSection = 'strings' | 'woodwinds' | 'brass' | 'percussion' | 'keyboard' | 'vocal';
|
|
181
|
+
/**
|
|
182
|
+
* Architecture awareness metadata
|
|
183
|
+
*/
|
|
184
|
+
interface ArchitectureAwareness {
|
|
185
|
+
position: AgentPosition;
|
|
186
|
+
section?: AgentSection;
|
|
187
|
+
role: string;
|
|
188
|
+
visualizationDoc?: string;
|
|
189
|
+
musicPatterns?: {
|
|
190
|
+
interval: 'I' | 'II' | 'III' | 'IV' | 'V' | 'VI' | 'VII' | 'VIII';
|
|
191
|
+
formRole: 'exposition' | 'development' | 'recapitulation' | 'coda' | 'refrain';
|
|
192
|
+
pulse: 'strong' | 'weak' | 'syncopated';
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Phase configuration overrides
|
|
197
|
+
*/
|
|
198
|
+
interface PhaseConfig {
|
|
199
|
+
enabled?: boolean;
|
|
200
|
+
timeout_ms?: number;
|
|
201
|
+
retries?: number;
|
|
202
|
+
parallel?: boolean;
|
|
203
|
+
dependencies?: AgentPhase[];
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Curiosity configuration (what's next?)
|
|
207
|
+
*/
|
|
208
|
+
interface CuriosityConfig {
|
|
209
|
+
enabled: boolean;
|
|
210
|
+
depth: 'shallow' | 'medium' | 'deep';
|
|
211
|
+
sources: Array<'todo' | 'handoff' | 'codebase' | 'related' | 'improvement' | 'pattern'>;
|
|
212
|
+
auto_continue: boolean;
|
|
213
|
+
max_results: number;
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Budget configuration for runaway prevention
|
|
217
|
+
*/
|
|
218
|
+
interface BudgetConfig {
|
|
219
|
+
max_tokens_per_cycle: number;
|
|
220
|
+
max_duration_ms: number;
|
|
221
|
+
max_actions_per_minute: number;
|
|
222
|
+
max_consecutive_failures: number;
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* Complete agent configuration
|
|
226
|
+
*/
|
|
227
|
+
interface AgentConfig {
|
|
228
|
+
agent_id: string;
|
|
229
|
+
agent_name: string;
|
|
230
|
+
agent_type: string;
|
|
231
|
+
categories: AgentCategory[];
|
|
232
|
+
architecture?: ArchitectureAwareness;
|
|
233
|
+
phases?: Partial<Record<AgentPhase, PhaseConfig>>;
|
|
234
|
+
phase_timings?: Partial<Record<AgentPhase, number>>;
|
|
235
|
+
enabled_phases?: AgentPhase[];
|
|
236
|
+
auto_transition?: boolean;
|
|
237
|
+
curiosity?: Partial<CuriosityConfig>;
|
|
238
|
+
budget?: Partial<BudgetConfig>;
|
|
239
|
+
llm?: {
|
|
240
|
+
model?: string;
|
|
241
|
+
temperature?: number;
|
|
242
|
+
max_tokens?: number;
|
|
243
|
+
system_prompt?: string;
|
|
244
|
+
};
|
|
245
|
+
custom?: Record<string, unknown>;
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Cycle metrics for lifespan tracking
|
|
249
|
+
*/
|
|
250
|
+
interface CycleMetric {
|
|
251
|
+
cycle_number: number;
|
|
252
|
+
duration_ms: number;
|
|
253
|
+
success: boolean;
|
|
254
|
+
score: number;
|
|
255
|
+
timestamp: number;
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* Agent lifespan context - tracks evolution across cycles
|
|
259
|
+
*/
|
|
260
|
+
interface AgentLifespanContext {
|
|
261
|
+
total_cycles_completed: number;
|
|
262
|
+
evolution_level: number;
|
|
263
|
+
performance_trend: 'improving' | 'stable' | 'declining';
|
|
264
|
+
average_cycle_duration: number;
|
|
265
|
+
recent_metrics: CycleMetric[];
|
|
266
|
+
knowledge_growth_trajectory: number;
|
|
267
|
+
adaptation_score: number;
|
|
268
|
+
related_tasks: string[];
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* Assistant-specific lifespan context (e.g., Brittney)
|
|
272
|
+
*/
|
|
273
|
+
interface AssistantLifespanContext {
|
|
274
|
+
total_interactions: number;
|
|
275
|
+
training_data_processed: number;
|
|
276
|
+
personality_evolution: {
|
|
277
|
+
emotional_responsiveness: number;
|
|
278
|
+
communication_style: string[];
|
|
279
|
+
user_preferences: Record<string, unknown>;
|
|
280
|
+
};
|
|
281
|
+
desktop_environment_memory: {
|
|
282
|
+
frequent_apps: string[];
|
|
283
|
+
window_arrangement_patterns: string[];
|
|
284
|
+
user_workflows: string[];
|
|
285
|
+
last_active_session_id?: string;
|
|
286
|
+
};
|
|
287
|
+
conversation_history: unknown[];
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* Complete agent state
|
|
291
|
+
*/
|
|
292
|
+
interface AgentState {
|
|
293
|
+
agent_id: string;
|
|
294
|
+
current_phase: AgentPhase;
|
|
295
|
+
phase_start_time: number;
|
|
296
|
+
cycle_number: number;
|
|
297
|
+
knowledge: Map<string, unknown>;
|
|
298
|
+
patterns: unknown[];
|
|
299
|
+
wisdom: unknown[];
|
|
300
|
+
gotchas: unknown[];
|
|
301
|
+
reflection_context: Record<string, unknown>;
|
|
302
|
+
execution_result: unknown;
|
|
303
|
+
compressed_knowledge: string;
|
|
304
|
+
metrics: {
|
|
305
|
+
phases_completed: number;
|
|
306
|
+
total_cycles: number;
|
|
307
|
+
efficiency_score: number;
|
|
308
|
+
token_usage: number;
|
|
309
|
+
};
|
|
310
|
+
lifespan?: AgentLifespanContext;
|
|
311
|
+
assistant_lifespan?: AssistantLifespanContext;
|
|
312
|
+
is_training_mode: boolean;
|
|
313
|
+
is_shutting_down: boolean;
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* Message priority levels
|
|
317
|
+
*/
|
|
318
|
+
type MessagePriority = 'low' | 'medium' | 'high' | 'critical' | 'sovereign';
|
|
319
|
+
/**
|
|
320
|
+
* Inter-agent message
|
|
321
|
+
*/
|
|
322
|
+
interface AgentMessage {
|
|
323
|
+
id: string;
|
|
324
|
+
from: string;
|
|
325
|
+
to: string | 'broadcast';
|
|
326
|
+
type: 'request' | 'response' | 'notification' | 'event';
|
|
327
|
+
action: string;
|
|
328
|
+
payload: Record<string, unknown>;
|
|
329
|
+
priority: MessagePriority;
|
|
330
|
+
timestamp: number;
|
|
331
|
+
correlation_id?: string;
|
|
332
|
+
ttl_ms?: number;
|
|
333
|
+
}
|
|
334
|
+
/**
|
|
335
|
+
* Agent response
|
|
336
|
+
*/
|
|
337
|
+
interface AgentResponse {
|
|
338
|
+
message_id: string;
|
|
339
|
+
success: boolean;
|
|
340
|
+
data?: unknown;
|
|
341
|
+
error?: string;
|
|
342
|
+
duration_ms: number;
|
|
343
|
+
}
|
|
344
|
+
/**
|
|
345
|
+
* Pattern entry for knowledge base
|
|
346
|
+
*/
|
|
347
|
+
interface PatternEntry {
|
|
348
|
+
pattern_id: string;
|
|
349
|
+
name: string;
|
|
350
|
+
domain: string;
|
|
351
|
+
description: string;
|
|
352
|
+
template: string;
|
|
353
|
+
confidence: number;
|
|
354
|
+
usage_count: number;
|
|
355
|
+
created_at: string;
|
|
356
|
+
updated_at: string;
|
|
357
|
+
tags: string[];
|
|
358
|
+
}
|
|
359
|
+
/**
|
|
360
|
+
* Wisdom entry for knowledge base
|
|
361
|
+
*/
|
|
362
|
+
interface WisdomEntry {
|
|
363
|
+
wisdom_id: string;
|
|
364
|
+
content: string;
|
|
365
|
+
domain: string;
|
|
366
|
+
source: string;
|
|
367
|
+
confidence: number;
|
|
368
|
+
citations: string[];
|
|
369
|
+
created_at: string;
|
|
370
|
+
tags: string[];
|
|
371
|
+
}
|
|
372
|
+
/**
|
|
373
|
+
* Gotcha entry for knowledge base
|
|
374
|
+
*/
|
|
375
|
+
interface GotchaEntry {
|
|
376
|
+
gotcha_id: string;
|
|
377
|
+
trigger: string;
|
|
378
|
+
consequence: string;
|
|
379
|
+
avoidance: string;
|
|
380
|
+
domain: string;
|
|
381
|
+
severity: 'low' | 'medium' | 'high' | 'critical';
|
|
382
|
+
occurrence_count: number;
|
|
383
|
+
created_at: string;
|
|
384
|
+
tags: string[];
|
|
385
|
+
}
|
|
386
|
+
/**
|
|
387
|
+
* Agent-specific trait context
|
|
388
|
+
*/
|
|
389
|
+
interface AgentTraitContext {
|
|
390
|
+
agent_id: string;
|
|
391
|
+
agent_name: string;
|
|
392
|
+
agent_type: string;
|
|
393
|
+
current_phase: AgentPhase;
|
|
394
|
+
phase_history: AgentPhase[];
|
|
395
|
+
getKnowledge: (key: string) => unknown;
|
|
396
|
+
setKnowledge: (key: string, value: unknown) => void;
|
|
397
|
+
queryKnowledge: (query: string) => Promise<unknown[]>;
|
|
398
|
+
sendMessage: (to: string, action: string, payload: unknown) => Promise<AgentResponse>;
|
|
399
|
+
broadcast: (action: string, payload: unknown) => Promise<void>;
|
|
400
|
+
callAI: (options: {
|
|
401
|
+
prompt: string;
|
|
402
|
+
context?: Record<string, unknown>;
|
|
403
|
+
model?: string;
|
|
404
|
+
temperature?: number;
|
|
405
|
+
max_tokens?: number;
|
|
406
|
+
}) => Promise<{
|
|
407
|
+
text: string;
|
|
408
|
+
tokens_used: number;
|
|
409
|
+
}>;
|
|
410
|
+
transitionTo: (phase: AgentPhase) => void;
|
|
411
|
+
skipPhase: (phase: AgentPhase) => void;
|
|
412
|
+
repeatPhase: () => void;
|
|
413
|
+
recordMetric: (name: string, value: number) => void;
|
|
414
|
+
getMetrics: () => Record<string, number>;
|
|
415
|
+
log: (level: 'debug' | 'info' | 'warn' | 'error', message: string, data?: unknown) => void;
|
|
416
|
+
wallet?: {
|
|
417
|
+
getBalance: (asset?: string) => Promise<number>;
|
|
418
|
+
pay: (endpoint: string, amount: number, asset: string) => Promise<{
|
|
419
|
+
success: boolean;
|
|
420
|
+
txHash?: string;
|
|
421
|
+
}>;
|
|
422
|
+
trade: (from: string, to: string, amount: number) => Promise<{
|
|
423
|
+
success: boolean;
|
|
424
|
+
txHash?: string;
|
|
425
|
+
}>;
|
|
426
|
+
mintNFT: (metadata: Record<string, any>) => Promise<{
|
|
427
|
+
success: boolean;
|
|
428
|
+
tokenId?: string;
|
|
429
|
+
}>;
|
|
430
|
+
};
|
|
431
|
+
story_weaver?: {
|
|
432
|
+
generateNarrative: (context: Record<string, unknown>) => Promise<string>;
|
|
433
|
+
createWorld: (theme: string) => Promise<string>;
|
|
434
|
+
deployContracts: (worldId: string) => Promise<boolean>;
|
|
435
|
+
};
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
/**
|
|
439
|
+
* @holoscript/core - Agent Manifest Definitions
|
|
440
|
+
*
|
|
441
|
+
* Defines the structure for agent registration and capability declaration.
|
|
442
|
+
* Part of HoloScript v3.1 Agentic Choreography.
|
|
443
|
+
*/
|
|
444
|
+
|
|
445
|
+
/**
|
|
446
|
+
* Resource cost for executing a capability
|
|
447
|
+
*/
|
|
448
|
+
interface ResourceCost {
|
|
449
|
+
/** Estimated compute cost (0-100 scale) */
|
|
450
|
+
compute: number;
|
|
451
|
+
/** Estimated memory usage (0-100 scale) */
|
|
452
|
+
memory: number;
|
|
453
|
+
/** Estimated network usage (0-100 scale) */
|
|
454
|
+
network: number;
|
|
455
|
+
/** Token cost for LLM operations (if applicable) */
|
|
456
|
+
tokens?: number;
|
|
457
|
+
}
|
|
458
|
+
/**
|
|
459
|
+
* Latency profile for a capability
|
|
460
|
+
*/
|
|
461
|
+
type LatencyProfile = 'instant' | 'fast' | 'medium' | 'slow' | 'background';
|
|
462
|
+
/**
|
|
463
|
+
* Latency thresholds in milliseconds
|
|
464
|
+
*/
|
|
465
|
+
declare const LATENCY_THRESHOLDS: Record<LatencyProfile, number>;
|
|
466
|
+
/**
|
|
467
|
+
* Capability types that agents can provide
|
|
468
|
+
*/
|
|
469
|
+
type CapabilityType = 'render' | 'analyze' | 'generate' | 'approve' | 'detect' | 'transform' | 'store' | 'retrieve' | 'communicate' | 'orchestrate' | 'validate' | 'optimize' | 'custom';
|
|
470
|
+
/**
|
|
471
|
+
* Capability domains
|
|
472
|
+
*/
|
|
473
|
+
type CapabilityDomain = 'vision' | 'nlp' | 'spatial' | 'blockchain' | 'audio' | 'video' | 'physics' | 'networking' | 'storage' | 'security' | 'trading' | 'social' | 'gaming' | 'general';
|
|
474
|
+
/**
|
|
475
|
+
* Single agent capability
|
|
476
|
+
*/
|
|
477
|
+
interface AgentCapability {
|
|
478
|
+
/** Capability type identifier */
|
|
479
|
+
type: CapabilityType | string;
|
|
480
|
+
/** Domain the capability operates in */
|
|
481
|
+
domain: CapabilityDomain | string;
|
|
482
|
+
/** Unique capability identifier */
|
|
483
|
+
id?: string;
|
|
484
|
+
/** Human-readable name */
|
|
485
|
+
name?: string;
|
|
486
|
+
/** Description of what this capability does */
|
|
487
|
+
description?: string;
|
|
488
|
+
/** Resource cost profile */
|
|
489
|
+
cost?: Partial<ResourceCost>;
|
|
490
|
+
/** Expected latency */
|
|
491
|
+
latency?: LatencyProfile;
|
|
492
|
+
/** Capability version */
|
|
493
|
+
version?: string;
|
|
494
|
+
/** Required input types */
|
|
495
|
+
inputs?: string[];
|
|
496
|
+
/** Output type */
|
|
497
|
+
output?: string;
|
|
498
|
+
/** Whether this capability is currently available */
|
|
499
|
+
available?: boolean;
|
|
500
|
+
/** Priority for conflict resolution (higher = preferred) */
|
|
501
|
+
priority?: number;
|
|
502
|
+
/** Custom metadata */
|
|
503
|
+
metadata?: Record<string, unknown>;
|
|
504
|
+
}
|
|
505
|
+
/**
|
|
506
|
+
* Endpoint protocol types
|
|
507
|
+
*/
|
|
508
|
+
type EndpointProtocol = 'local' | 'ipc' | 'http' | 'https' | 'ws' | 'wss' | 'grpc' | 'mqtt' | 'custom';
|
|
509
|
+
/**
|
|
510
|
+
* Agent communication endpoint
|
|
511
|
+
*/
|
|
512
|
+
interface AgentEndpoint {
|
|
513
|
+
/** Endpoint protocol */
|
|
514
|
+
protocol: EndpointProtocol;
|
|
515
|
+
/** Endpoint address (URL, IPC path, etc.) */
|
|
516
|
+
address: string;
|
|
517
|
+
/** Endpoint port (if applicable) */
|
|
518
|
+
port?: number;
|
|
519
|
+
/** Whether this is the primary endpoint */
|
|
520
|
+
primary?: boolean;
|
|
521
|
+
/** Health check path (if applicable) */
|
|
522
|
+
healthPath?: string;
|
|
523
|
+
/** Authentication required */
|
|
524
|
+
authRequired?: boolean;
|
|
525
|
+
/** Supported message formats */
|
|
526
|
+
formats?: Array<'json' | 'msgpack' | 'protobuf' | 'custom'>;
|
|
527
|
+
}
|
|
528
|
+
/**
|
|
529
|
+
* 3D Vector for spatial definitions
|
|
530
|
+
*/
|
|
531
|
+
interface Vector3 {
|
|
532
|
+
x: number;
|
|
533
|
+
y: number;
|
|
534
|
+
z: number;
|
|
535
|
+
}
|
|
536
|
+
/**
|
|
537
|
+
* Bounding box for spatial agents
|
|
538
|
+
*/
|
|
539
|
+
interface BoundingBox {
|
|
540
|
+
/** Minimum point (corner) */
|
|
541
|
+
min: Vector3;
|
|
542
|
+
/** Maximum point (opposite corner) */
|
|
543
|
+
max: Vector3;
|
|
544
|
+
/** Coordinate system reference */
|
|
545
|
+
coordinateSystem?: 'world' | 'local' | 'scene';
|
|
546
|
+
}
|
|
547
|
+
/**
|
|
548
|
+
* Spatial scope for agents
|
|
549
|
+
*/
|
|
550
|
+
interface SpatialScope {
|
|
551
|
+
/** Bounding box if defined */
|
|
552
|
+
bounds?: BoundingBox;
|
|
553
|
+
/** Named scene/world */
|
|
554
|
+
scene?: string;
|
|
555
|
+
/** Specific node IDs this agent operates on */
|
|
556
|
+
nodes?: string[];
|
|
557
|
+
/** Radius from a center point */
|
|
558
|
+
radius?: {
|
|
559
|
+
center: Vector3;
|
|
560
|
+
distance: number;
|
|
561
|
+
};
|
|
562
|
+
/** Whether agent can operate outside its spatial scope */
|
|
563
|
+
global?: boolean;
|
|
564
|
+
}
|
|
565
|
+
/**
|
|
566
|
+
* Trust level for agents
|
|
567
|
+
*/
|
|
568
|
+
type TrustLevel = 'local' | 'verified' | 'known' | 'external' | 'untrusted';
|
|
569
|
+
/**
|
|
570
|
+
* Verification status
|
|
571
|
+
*/
|
|
572
|
+
interface VerificationStatus {
|
|
573
|
+
/** Whether the agent is verified */
|
|
574
|
+
verified: boolean;
|
|
575
|
+
/** Verification method used */
|
|
576
|
+
method?: 'signature' | 'certificate' | 'oauth' | 'token' | 'manual';
|
|
577
|
+
/** When verification was performed */
|
|
578
|
+
verifiedAt?: number;
|
|
579
|
+
/** When verification expires */
|
|
580
|
+
expiresAt?: number;
|
|
581
|
+
/** Verifying authority */
|
|
582
|
+
authority?: string;
|
|
583
|
+
/** Verification signature/proof */
|
|
584
|
+
proof?: string;
|
|
585
|
+
}
|
|
586
|
+
/**
|
|
587
|
+
* Complete agent manifest for registration
|
|
588
|
+
*/
|
|
589
|
+
interface AgentManifest {
|
|
590
|
+
/** Unique agent identifier */
|
|
591
|
+
id: string;
|
|
592
|
+
/** Human-readable agent name */
|
|
593
|
+
name: string;
|
|
594
|
+
/** Agent version (semver) */
|
|
595
|
+
version: string;
|
|
596
|
+
/** Agent description */
|
|
597
|
+
description?: string;
|
|
598
|
+
/** Agent categories */
|
|
599
|
+
categories?: AgentCategory[];
|
|
600
|
+
/** Position in architecture */
|
|
601
|
+
position?: AgentPosition;
|
|
602
|
+
/** Orchestral section */
|
|
603
|
+
section?: AgentSection;
|
|
604
|
+
/** Custom tags for filtering */
|
|
605
|
+
tags?: string[];
|
|
606
|
+
/** List of capabilities this agent provides */
|
|
607
|
+
capabilities: AgentCapability[];
|
|
608
|
+
/** Available endpoints for communication */
|
|
609
|
+
endpoints: AgentEndpoint[];
|
|
610
|
+
/** Spatial scope this agent operates in */
|
|
611
|
+
spatialScope?: SpatialScope;
|
|
612
|
+
/** Trust level */
|
|
613
|
+
trustLevel: TrustLevel;
|
|
614
|
+
/** Verification status */
|
|
615
|
+
verification?: VerificationStatus;
|
|
616
|
+
/** Health check interval in ms */
|
|
617
|
+
healthCheckInterval?: number;
|
|
618
|
+
/** Last heartbeat timestamp */
|
|
619
|
+
lastHeartbeat?: number;
|
|
620
|
+
/** Current health status */
|
|
621
|
+
status?: 'online' | 'offline' | 'degraded' | 'unknown';
|
|
622
|
+
/** Registration timestamp */
|
|
623
|
+
registeredAt?: number;
|
|
624
|
+
/** Last updated timestamp */
|
|
625
|
+
updatedAt?: number;
|
|
626
|
+
/** Owner/creator identifier */
|
|
627
|
+
owner?: string;
|
|
628
|
+
/** Source repository/package */
|
|
629
|
+
source?: string;
|
|
630
|
+
/** Custom metadata */
|
|
631
|
+
metadata?: Record<string, unknown>;
|
|
632
|
+
}
|
|
633
|
+
/**
|
|
634
|
+
* Fluent builder for creating agent manifests
|
|
635
|
+
*/
|
|
636
|
+
declare class AgentManifestBuilder {
|
|
637
|
+
private manifest;
|
|
638
|
+
/**
|
|
639
|
+
* Set agent identity
|
|
640
|
+
*/
|
|
641
|
+
identity(id: string, name: string, version: string): this;
|
|
642
|
+
/**
|
|
643
|
+
* Set agent description
|
|
644
|
+
*/
|
|
645
|
+
description(desc: string): this;
|
|
646
|
+
/**
|
|
647
|
+
* Set classification
|
|
648
|
+
*/
|
|
649
|
+
classify(categories: AgentCategory[], position?: AgentPosition, section?: AgentSection): this;
|
|
650
|
+
/**
|
|
651
|
+
* Add a capability
|
|
652
|
+
*/
|
|
653
|
+
addCapability(capability: AgentCapability): this;
|
|
654
|
+
/**
|
|
655
|
+
* Add multiple capabilities
|
|
656
|
+
*/
|
|
657
|
+
addCapabilities(capabilities: AgentCapability[]): this;
|
|
658
|
+
/**
|
|
659
|
+
* Add an endpoint
|
|
660
|
+
*/
|
|
661
|
+
addEndpoint(endpoint: AgentEndpoint): this;
|
|
662
|
+
/**
|
|
663
|
+
* Set spatial scope
|
|
664
|
+
*/
|
|
665
|
+
spatial(scope: SpatialScope): this;
|
|
666
|
+
/**
|
|
667
|
+
* Set trust level
|
|
668
|
+
*/
|
|
669
|
+
trust(level: TrustLevel, verification?: VerificationStatus): this;
|
|
670
|
+
/**
|
|
671
|
+
* Set health check interval
|
|
672
|
+
*/
|
|
673
|
+
healthCheck(intervalMs: number): this;
|
|
674
|
+
/**
|
|
675
|
+
* Add custom tags
|
|
676
|
+
*/
|
|
677
|
+
tags(...tags: string[]): this;
|
|
678
|
+
/**
|
|
679
|
+
* Set metadata
|
|
680
|
+
*/
|
|
681
|
+
metadata(data: Record<string, unknown>): this;
|
|
682
|
+
/**
|
|
683
|
+
* Build the manifest
|
|
684
|
+
*/
|
|
685
|
+
build(): AgentManifest;
|
|
686
|
+
}
|
|
687
|
+
/**
|
|
688
|
+
* Create a new manifest builder
|
|
689
|
+
*/
|
|
690
|
+
declare function createManifest(): AgentManifestBuilder;
|
|
691
|
+
/**
|
|
692
|
+
* Validation result
|
|
693
|
+
*/
|
|
694
|
+
interface ValidationResult {
|
|
695
|
+
valid: boolean;
|
|
696
|
+
errors: string[];
|
|
697
|
+
warnings: string[];
|
|
698
|
+
}
|
|
699
|
+
/**
|
|
700
|
+
* Validate an agent manifest
|
|
701
|
+
*/
|
|
702
|
+
declare function validateManifest(manifest: Partial<AgentManifest>): ValidationResult;
|
|
703
|
+
|
|
704
|
+
export { type AgentManifest as A, type BoundingBox as B, type CapabilityType as C, DEFAULT_PHASE_TIMINGS as D, type EndpointProtocol as E, LATENCY_THRESHOLDS as F, type GotchaEntry as G, type PatternEntry as H, type IntakeResult as I, type PhaseConfig as J, type PhaseResult as K, type LatencyProfile as L, type MessagePriority as M, type ReintakeResult as N, type ResourceCost as O, PHASE_ORDER as P, type VerificationStatus as Q, type ReflectResult as R, type SpatialScope as S, type TrustLevel as T, createManifest as U, type Vector3 as V, type WisdomEntry as W, validateManifest as X, type AgentCapability as a, type CapabilityDomain as b, type AgentCategory as c, type AgentConfig as d, type AgentEndpoint as e, type AgentLifespanContext as f, AgentManifestBuilder as g, type AgentMessage as h, type AgentPhase as i, type AgentPosition as j, type AgentResponse as k, type AgentSection as l, type AgentState as m, type AgentTraitContext as n, type ValidationResult as o, type AnyPhaseResult as p, type ArchitectureAwareness as q, type AssistantLifespanContext as r, type BudgetConfig as s, type CompressResult as t, type CuriosityConfig as u, type CycleMetric as v, type CycleResult as w, type EvolveResult as x, type ExecuteResult as y, type GrowResult as z };
|