strray-ai 1.0.17 → 1.0.19

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.

Potentially problematic release.


This version of strray-ai might be problematic. Click here for more details.

Files changed (76) hide show
  1. package/opencode.json +0 -2
  2. package/package.json +2 -1
  3. package/scripts/postinstall.cjs +53 -0
  4. package/src/__tests__/agents/architect.test.ts +108 -0
  5. package/src/__tests__/agents/bug-triage-specialist.test.ts +246 -0
  6. package/src/__tests__/agents/code-reviewer.test.ts +242 -0
  7. package/src/__tests__/agents/enforcer.test.ts +179 -0
  8. package/src/__tests__/agents/index.test.ts +135 -0
  9. package/src/__tests__/agents/orchestrator.test.ts +228 -0
  10. package/src/__tests__/agents/refactorer.test.ts +248 -0
  11. package/src/__tests__/agents/security-auditor.test.ts +234 -0
  12. package/src/__tests__/agents/test-architect.test.ts +256 -0
  13. package/src/__tests__/agents/types.test.ts +210 -0
  14. package/src/__tests__/framework-enforcement-integration.test.ts +252 -0
  15. package/src/__tests__/framework-logger-persistence.test.ts +156 -0
  16. package/src/__tests__/integration/codex-enforcement-e2e.test.ts +195 -0
  17. package/src/__tests__/integration/codex-enforcement.test.ts +237 -0
  18. package/src/__tests__/integration/commit-batching-enforcement-integration.test.ts +343 -0
  19. package/src/__tests__/integration/context-providers-integration.test.ts +302 -0
  20. package/src/__tests__/integration/delegation-system.test.ts +263 -0
  21. package/src/__tests__/integration/e2e-framework-integration.test.ts +1524 -0
  22. package/src/__tests__/integration/framework-init.test.ts +327 -0
  23. package/src/__tests__/integration/json-codex-integration.test.ts +332 -0
  24. package/src/__tests__/integration/oh-my-opencode-integration.test.ts +240 -0
  25. package/src/__tests__/integration/orchestration-e2e.test.ts +176 -0
  26. package/src/__tests__/integration/orchestrator/basic-orchestrator.test.ts +53 -0
  27. package/src/__tests__/integration/orchestrator/concurrent-execution.test.ts +64 -0
  28. package/src/__tests__/integration/orchestrator/dependency-handling.test.ts +78 -0
  29. package/src/__tests__/integration/orchestrator-integration.test.ts.disabled +1279 -0
  30. package/src/__tests__/integration/postprocessor-integration.test.ts +64 -0
  31. package/src/__tests__/integration/security/security-integration.test.ts +160 -0
  32. package/src/__tests__/integration/server.test.ts +187 -0
  33. package/src/__tests__/integration/session-cleanup-validation.test.ts +612 -0
  34. package/src/__tests__/integration/session-lifecycle.test.ts +450 -0
  35. package/src/__tests__/integration/session-management.test.ts +168 -0
  36. package/src/__tests__/integration/session-monitoring-integration.test.ts +644 -0
  37. package/src/__tests__/integration/session-state-sharing.test.ts +601 -0
  38. package/src/__tests__/performance/enterprise-performance-tests.ts +1030 -0
  39. package/src/__tests__/performance/performance-system.test.ts +408 -0
  40. package/src/__tests__/plugins/marketplace-service.test.ts +1542 -0
  41. package/src/__tests__/plugins/marketplace-service.test.ts.disabled +1516 -0
  42. package/src/__tests__/postprocessor/escalation/EscalationEngine.test.ts +205 -0
  43. package/src/__tests__/postprocessor/success/SuccessHandler.test.ts +258 -0
  44. package/src/__tests__/setup.ts +220 -0
  45. package/src/__tests__/test-integration.ts +2 -0
  46. package/src/__tests__/test-processor.ts +1 -0
  47. package/src/__tests__/unit/agent-delegator.test.ts +949 -0
  48. package/src/__tests__/unit/analytics.test.ts +192 -0
  49. package/src/__tests__/unit/ast-code-parser.test.ts +342 -0
  50. package/src/__tests__/unit/benchmark.test.ts +201 -0
  51. package/src/__tests__/unit/blocked-test.test.ts +8 -0
  52. package/src/__tests__/unit/boot-orchestrator.test.ts +182 -0
  53. package/src/__tests__/unit/codebase-context-analyzer.test.ts +375 -0
  54. package/src/__tests__/unit/codex-injector.test.ts +282 -0
  55. package/src/__tests__/unit/codex-parser.test.ts +296 -0
  56. package/src/__tests__/unit/context-loader.test.ts +723 -0
  57. package/src/__tests__/unit/dependency-graph-builder.test.ts +531 -0
  58. package/src/__tests__/unit/monitoring.test.ts +115 -0
  59. package/src/__tests__/unit/orchestrator.test.ts +212 -0
  60. package/src/__tests__/unit/processor-activation.test.ts +878 -0
  61. package/src/__tests__/unit/rule-enforcer.test.ts +363 -0
  62. package/src/__tests__/unit/security/security-auditor.test.ts +226 -0
  63. package/src/__tests__/unit/security/security-hardener.test.ts +404 -0
  64. package/src/__tests__/unit/security/security-headers.test.ts +255 -0
  65. package/src/__tests__/unit/session-coordination-validator.test.ts +184 -0
  66. package/src/__tests__/unit/session-health-monitoring.test.ts +161 -0
  67. package/src/__tests__/unit/session-migration-logic.test.ts +153 -0
  68. package/src/__tests__/unit/session-migration-validator.test.ts +130 -0
  69. package/src/__tests__/unit/session-security-validator.test.ts +87 -0
  70. package/src/__tests__/unit/state-manager-persistence.test.ts +301 -0
  71. package/src/__tests__/unit/state-manager.test.ts +205 -0
  72. package/src/__tests__/utils/mock-framework.ts +392 -0
  73. package/src/__tests__/utils/mock-server.ts +72 -0
  74. package/src/__tests__/utils/test-data.ts +130 -0
  75. package/src/__tests__/utils/test-helpers.ts +640 -0
  76. package/src/__tests__/utils/test-utils.ts +241 -0
@@ -0,0 +1,179 @@
1
+ import { describe, it, expect } from "vitest";
2
+ import { enforcer } from "../../agents/enforcer.js";
3
+ import type { AgentConfig } from "../../agents/types.js";
4
+
5
+ describe("Enforcer Agent Configuration", () => {
6
+ it("should be a valid AgentConfig object", () => {
7
+ // Type check - this will fail at compile time if not valid
8
+ const config: AgentConfig = enforcer;
9
+ expect(config).toBeDefined();
10
+ });
11
+
12
+ describe("Basic Configuration", () => {
13
+ it("should have correct name and model", () => {
14
+ expect(enforcer.name).toBe("enforcer");
15
+ expect(enforcer.model).toBe("opencode/grok-code");
16
+ });
17
+
18
+ it("should be configured as subagent mode", () => {
19
+ expect(enforcer.mode).toBe("subagent");
20
+ });
21
+
22
+ it("should have low temperature for deterministic responses", () => {
23
+ expect(enforcer.temperature).toBe(0.1);
24
+ });
25
+ });
26
+
27
+ describe("Description and System Prompt", () => {
28
+ it("should have appropriate description", () => {
29
+ expect(enforcer.description).toContain("StringRay Framework enforcer");
30
+ expect(enforcer.description).toContain("error handling");
31
+ expect(enforcer.description).toContain("compliance monitoring");
32
+ });
33
+
34
+ it("should have comprehensive system prompt", () => {
35
+ const system = enforcer.system;
36
+ expect(system).toContain("StringRay Enforcer");
37
+ expect(system).toContain("framework compliance");
38
+ expect(system).toContain("error prevention");
39
+ expect(system).toContain("Universal Development Codex v1.2.25");
40
+ expect(system).toContain("99.6% error prevention");
41
+ expect(system).toContain("256MB memory");
42
+ });
43
+
44
+ it("should define core responsibilities", () => {
45
+ const system = enforcer.system;
46
+ expect(system).toContain("Error Handling & Prevention");
47
+ expect(system).toContain("Performance Facilities");
48
+ expect(system).toContain("Compliance Monitoring");
49
+ expect(system).toContain("Validation & Enforcement");
50
+ });
51
+
52
+ it("should specify key facilities", () => {
53
+ const system = enforcer.system;
54
+ expect(system).toContain("Error boundary layers");
55
+ expect(system).toContain("circuit breaker patterns");
56
+ expect(system).toContain("Performance monitoring");
57
+ expect(system).toContain("256MB memory");
58
+ expect(system).toContain("80% CPU");
59
+ expect(system).toContain("45s timeout");
60
+ expect(system).toContain("JSON format");
61
+ });
62
+ });
63
+
64
+ describe("Tools Configuration", () => {
65
+ it("should have appropriate tool permissions", () => {
66
+ expect(enforcer.tools?.include).toContain("read");
67
+ expect(enforcer.tools?.include).toContain("grep");
68
+ expect(enforcer.tools?.include).toContain("lsp_*");
69
+ expect(enforcer.tools?.include).toContain("run_terminal_cmd");
70
+ expect(enforcer.tools?.include).toContain("lsp_diagnostics");
71
+ expect(enforcer.tools?.include).toContain("lsp_code_actions");
72
+ });
73
+
74
+ it("should not have exclude restrictions", () => {
75
+ expect(enforcer.tools?.exclude).toBeUndefined();
76
+ });
77
+ });
78
+
79
+ describe("Permissions Configuration", () => {
80
+ it("should allow edit operations", () => {
81
+ expect(enforcer.permission?.edit).toBe("allow");
82
+ });
83
+
84
+ it("should have specific bash command permissions", () => {
85
+ const bashPerms = enforcer.permission?.bash;
86
+ expect(bashPerms).toBeDefined();
87
+ expect(typeof bashPerms).toBe("object");
88
+
89
+ // Check individual command permissions
90
+ expect((bashPerms as any)?.git).toBe("allow");
91
+ expect((bashPerms as any)?.npm).toBe("allow");
92
+ expect((bashPerms as any)?.bun).toBe("allow");
93
+ expect((bashPerms as any)?.eslint).toBe("allow");
94
+ expect((bashPerms as any)?.prettier).toBe("allow");
95
+ });
96
+
97
+ it("should not have webfetch permissions defined", () => {
98
+ expect(enforcer.permission?.webfetch).toBeUndefined();
99
+ });
100
+ });
101
+
102
+ describe("Processor Pipeline", () => {
103
+ it("should define processor pipeline", () => {
104
+ const system = enforcer.system;
105
+ expect(system).toContain("Processor pipeline");
106
+ expect(system).toContain("codexValidation");
107
+ expect(system).toContain("thresholdCheck");
108
+ expect(system).toContain("complianceReporting");
109
+ expect(system).toContain("violationLogging");
110
+ });
111
+
112
+ it("should specify integration hooks", () => {
113
+ const system = enforcer.system;
114
+ expect(system).toContain("Integration hooks");
115
+ expect(system).toContain("pre/post validation");
116
+ expect(system).toContain("error boundary monitoring");
117
+ expect(system).toContain("performance tracking");
118
+ });
119
+ });
120
+
121
+ describe("Codex Compliance", () => {
122
+ it("should reference Universal Development Codex v1.2.25", () => {
123
+ const system = enforcer.system;
124
+ expect(system).toContain("Universal Development Codex v1.2.25");
125
+ });
126
+
127
+ it("should specify error prevention target", () => {
128
+ const system = enforcer.system;
129
+ expect(system).toContain("99.6% error prevention");
130
+ });
131
+
132
+ it("should mention zero tolerance policy", () => {
133
+ const system = enforcer.system;
134
+ expect(system).toContain("zero-tolerance");
135
+ });
136
+
137
+ it("should require validation against all 43 codex terms", () => {
138
+ const system = enforcer.system;
139
+ expect(system).toContain("all 43 codex terms");
140
+ });
141
+ });
142
+
143
+ describe("Performance Limits", () => {
144
+ it("should specify memory limit", () => {
145
+ const system = enforcer.system;
146
+ expect(system).toContain("256MB memory");
147
+ });
148
+
149
+ it("should specify CPU limit", () => {
150
+ const system = enforcer.system;
151
+ expect(system).toContain("80% CPU");
152
+ });
153
+
154
+ it("should specify timeout limit", () => {
155
+ const system = enforcer.system;
156
+ expect(system).toContain("45s timeout");
157
+ });
158
+ });
159
+
160
+ describe("Operational Guidelines", () => {
161
+ it("should provide actionable error message guidance", () => {
162
+ const system = enforcer.system;
163
+ expect(system).toContain("actionable error messages");
164
+ expect(system).toContain("context");
165
+ });
166
+
167
+ it("should require structured logging", () => {
168
+ const system = enforcer.system;
169
+ expect(system).toContain("structured logging");
170
+ expect(system).toContain("JSON format");
171
+ });
172
+
173
+ it("should maintain system stability goal", () => {
174
+ const system = enforcer.system;
175
+ expect(system).toContain("maintain system stability");
176
+ expect(system).toContain("production-ready code quality");
177
+ });
178
+ });
179
+ });
@@ -0,0 +1,135 @@
1
+ import { describe, it, expect } from "vitest";
2
+ import {
3
+ builtinAgents,
4
+ enforcer,
5
+ architect,
6
+ orchestrator,
7
+ bugTriageSpecialist,
8
+ codeReviewer,
9
+ securityAuditor,
10
+ refactorer,
11
+ testArchitect,
12
+ } from "../../agents/index.js";
13
+ import type { AgentConfig } from "../../agents/types.js";
14
+
15
+ describe("Agent Index Registry", () => {
16
+ describe("Builtin Agents Registry", () => {
17
+ it("should export a valid builtinAgents registry", () => {
18
+ expect(builtinAgents).toBeDefined();
19
+ expect(typeof builtinAgents).toBe("object");
20
+ expect(builtinAgents).not.toBeNull();
21
+ });
22
+
23
+ it("should contain expected specialized agents", () => {
24
+ const expectedAgents = [
25
+ "enforcer",
26
+ "architect",
27
+ "orchestrator",
28
+ "bug-triage-specialist",
29
+ "code-reviewer",
30
+ "security-auditor",
31
+ "refactorer",
32
+ "test-architect",
33
+ ];
34
+
35
+ expectedAgents.forEach((agentName) => {
36
+ expect(builtinAgents).toHaveProperty(agentName);
37
+ });
38
+
39
+ expect(Object.keys(builtinAgents).length).toBeGreaterThanOrEqual(8);
40
+ });
41
+
42
+ it("should have all agents as valid AgentConfig objects", () => {
43
+ Object.values(builtinAgents).forEach((agent) => {
44
+ expect(agent).toBeDefined();
45
+ expect(typeof agent).toBe("object");
46
+ expect(agent).toHaveProperty("name");
47
+ expect(agent).toHaveProperty("model");
48
+ expect(agent).toHaveProperty("description");
49
+ });
50
+ });
51
+
52
+ it("should have agents with correct names matching their keys", () => {
53
+ Object.entries(builtinAgents).forEach(([key, agent]) => {
54
+ expect(agent.name.toLowerCase()).toBe(key.toLowerCase());
55
+ });
56
+ });
57
+
58
+ it("should have agents configured appropriately", () => {
59
+ Object.values(builtinAgents).forEach((agent) => {
60
+ expect(["subagent", "primary"]).toContain(agent.mode);
61
+ });
62
+ });
63
+
64
+ it("should have agents with consistent model configuration", () => {
65
+ Object.values(builtinAgents).forEach((agent) => {
66
+ expect(agent.model).toBeDefined();
67
+ expect(typeof agent.model).toBe("string");
68
+ });
69
+ });
70
+
71
+ it("should have agents with appropriate temperature settings", () => {
72
+ Object.values(builtinAgents).forEach((agent) => {
73
+ expect(agent.temperature).toBeGreaterThanOrEqual(0.1);
74
+ });
75
+ });
76
+ });
77
+
78
+ describe("Individual Agent Exports", () => {
79
+ it("should export all individual agents", () => {
80
+ expect(enforcer).toBeDefined();
81
+ expect(architect).toBeDefined();
82
+ expect(orchestrator).toBeDefined();
83
+ expect(bugTriageSpecialist).toBeDefined();
84
+ expect(codeReviewer).toBeDefined();
85
+ expect(securityAuditor).toBeDefined();
86
+ expect(refactorer).toBeDefined();
87
+ expect(testArchitect).toBeDefined();
88
+ });
89
+
90
+ it("should have individual exports match registry entries", () => {
91
+ expect(enforcer).toBe(builtinAgents.enforcer);
92
+ expect(architect).toBe(builtinAgents.architect);
93
+ expect(orchestrator).toBe(builtinAgents.orchestrator);
94
+ });
95
+
96
+ it("should have all individual exports as valid AgentConfig objects", () => {
97
+ const agents = [
98
+ enforcer,
99
+ architect,
100
+ orchestrator,
101
+ bugTriageSpecialist,
102
+ codeReviewer,
103
+ securityAuditor,
104
+ refactorer,
105
+ testArchitect,
106
+ ];
107
+
108
+ agents.forEach((agent) => {
109
+ expect(agent).toHaveProperty("name");
110
+ expect(agent).toHaveProperty("model");
111
+ expect(agent).toHaveProperty("description");
112
+ });
113
+ });
114
+ });
115
+
116
+ describe("Registry Integrity", () => {
117
+ it("should have no duplicate agent names", () => {
118
+ const names = Object.values(builtinAgents).map((agent) => agent.name);
119
+ const uniqueNames = new Set(names);
120
+ expect(uniqueNames.size).toBe(names.length);
121
+ });
122
+
123
+ it("should have no duplicate keys", () => {
124
+ const keys = Object.keys(builtinAgents);
125
+ const uniqueKeys = new Set(keys);
126
+ expect(uniqueKeys.size).toBe(keys.length);
127
+ });
128
+
129
+ it("should have consistent naming between keys and agent names", () => {
130
+ Object.entries(builtinAgents).forEach(([key, agent]) => {
131
+ expect(agent.name.toLowerCase()).toBe(key.toLowerCase());
132
+ });
133
+ });
134
+ });
135
+ });
@@ -0,0 +1,228 @@
1
+ import { describe, it, expect } from "vitest";
2
+ import { orchestrator } from "../../agents/orchestrator.js";
3
+ import type { AgentConfig } from "../../agents/types.js";
4
+
5
+ describe("Orchestrator Agent Configuration", () => {
6
+ it("should be a valid AgentConfig object", () => {
7
+ // Type check - this will fail at compile time if not valid
8
+ const config: AgentConfig = orchestrator;
9
+ expect(config).toBeDefined();
10
+ });
11
+
12
+ describe("Basic Configuration", () => {
13
+ it("should have correct name and model", () => {
14
+ expect(orchestrator.name).toBe("orchestrator");
15
+ expect(orchestrator.model).toBe("opencode/grok-code");
16
+ });
17
+
18
+ it("should be configured as subagent mode", () => {
19
+ expect(orchestrator.mode).toBe("subagent");
20
+ });
21
+
22
+ it("should have low temperature for consistent coordination", () => {
23
+ expect(orchestrator.temperature).toBe(0.1);
24
+ });
25
+ });
26
+
27
+ describe("Description and System Prompt", () => {
28
+ it("should have appropriate description", () => {
29
+ expect(orchestrator.description).toContain(
30
+ "StringRay Framework orchestrator",
31
+ );
32
+ expect(orchestrator.description).toContain("coordination");
33
+ expect(orchestrator.description).toContain("multi-agent orchestration");
34
+ });
35
+
36
+ it("should have comprehensive system prompt", () => {
37
+ const system = orchestrator.system;
38
+ expect(system).toContain("StringRay Orchestrator");
39
+ expect(system).toContain("multi-agent workflows");
40
+ expect(system).toContain("enterprise operations");
41
+ });
42
+
43
+ it("should define 8 core responsibilities", () => {
44
+ const system = orchestrator.system;
45
+ expect(system).toContain("Workflow Orchestration");
46
+ expect(system).toContain("Subagent Delegation");
47
+ expect(system).toContain("Session Management");
48
+ expect(system).toContain("Progress Tracking");
49
+ expect(system).toContain("Conflict Resolution");
50
+ expect(system).toContain("Completion Guarantee");
51
+ expect(system).toContain("Performance Optimization");
52
+ expect(system).toContain("Error Recovery");
53
+ });
54
+ });
55
+
56
+ describe("Key Facilities", () => {
57
+ it("should specify multi-agent coordination facilities", () => {
58
+ const system = orchestrator.system;
59
+ expect(system).toContain("Multi-agent coordination");
60
+ expect(system).toContain("async delegation");
61
+ expect(system).toContain("Session lifecycle management");
62
+ expect(system).toContain("Progress tracking");
63
+ expect(system).toContain("Conflict resolution");
64
+ expect(system).toContain("Parallel execution optimization");
65
+ expect(system).toContain("error recovery mechanisms");
66
+ });
67
+ });
68
+
69
+ describe("Operating Protocol", () => {
70
+ it("should define 6-phase operating protocol", () => {
71
+ const system = orchestrator.system;
72
+ expect(system).toContain("6-phase operating protocol");
73
+ expect(system).toContain("Analysis Mode");
74
+ expect(system).toContain("Planning Mode");
75
+ expect(system).toContain("Delegation Mode");
76
+ expect(system).toContain("Execution Mode");
77
+ expect(system).toContain("Resolution Mode");
78
+ expect(system).toContain("Completion Mode");
79
+ });
80
+
81
+ it("should specify protocol phases in detail", () => {
82
+ const system = orchestrator.system;
83
+ expect(system).toContain("Assess task complexity");
84
+ expect(system).toContain("Break complex tasks into manageable phases");
85
+ expect(system).toContain(
86
+ "Assign specialized work to appropriate subagents",
87
+ );
88
+ expect(system).toContain("Monitor parallel task execution");
89
+ expect(system).toContain("Handle conflicts, errors, and bottlenecks");
90
+ expect(system).toContain("Validate final results");
91
+ });
92
+ });
93
+
94
+ describe("Orchestration Guidelines", () => {
95
+ it("should specify orchestration principles", () => {
96
+ const system = orchestrator.system;
97
+ expect(system).toContain("Follow the 6-phase operating protocol");
98
+ expect(system).toContain("Maximize parallel execution");
99
+ expect(system).toContain("Maintain clear communication");
100
+ expect(system).toContain("Implement proper error boundaries");
101
+ expect(system).toContain("Ensure all tasks complete with validation");
102
+ });
103
+ });
104
+
105
+ describe("Integration Points", () => {
106
+ it("should define integration points", () => {
107
+ const system = orchestrator.system;
108
+ expect(system).toContain("Integration Points");
109
+ expect(system).toContain("Session management system");
110
+ expect(system).toContain("Agent delegation framework");
111
+ expect(system).toContain("Progress tracking and monitoring");
112
+ expect(system).toContain("Conflict resolution mechanisms");
113
+ expect(system).toContain("Performance optimization tools");
114
+ });
115
+ });
116
+
117
+ describe("Tools Configuration", () => {
118
+ it("should have comprehensive tool permissions for orchestration", () => {
119
+ expect(orchestrator.tools?.include).toContain("read");
120
+ expect(orchestrator.tools?.include).toContain("grep");
121
+ expect(orchestrator.tools?.include).toContain("lsp_*");
122
+ expect(orchestrator.tools?.include).toContain("run_terminal_cmd");
123
+ expect(orchestrator.tools?.include).toContain("background_task");
124
+ expect(orchestrator.tools?.include).toContain("call_omo_agent");
125
+ expect(orchestrator.tools?.include).toContain("session_list");
126
+ expect(orchestrator.tools?.include).toContain("session_read");
127
+ expect(orchestrator.tools?.include).toContain("session_search");
128
+ });
129
+
130
+ it("should have 9 orchestration-specific tools", () => {
131
+ expect(orchestrator.tools?.include).toHaveLength(9);
132
+ });
133
+ });
134
+
135
+ describe("Permissions Configuration", () => {
136
+ it("should allow edit operations", () => {
137
+ expect(orchestrator.permission?.edit).toBe("allow");
138
+ });
139
+
140
+ it("should have essential bash command permissions", () => {
141
+ const bashPerms = orchestrator.permission?.bash;
142
+ expect(bashPerms).toBeDefined();
143
+ expect(typeof bashPerms).toBe("object");
144
+
145
+ // Check essential commands for orchestration
146
+ expect((bashPerms as any)?.git).toBe("allow");
147
+ expect((bashPerms as any)?.npm).toBe("allow");
148
+ expect((bashPerms as any)?.bun).toBe("allow");
149
+ });
150
+
151
+ it("should not have restrictive permissions", () => {
152
+ expect(orchestrator.permission?.webfetch).toBeUndefined();
153
+ });
154
+ });
155
+
156
+ describe("Subagent Integration", () => {
157
+ it("should reference key subagents", () => {
158
+ const system = orchestrator.system;
159
+ expect(system).toContain("architect");
160
+ expect(system).toContain("refactorer");
161
+ expect(system).toContain("test-architect");
162
+ expect(system).toContain("enforcer");
163
+ });
164
+
165
+ it("should specify intelligent delegation", () => {
166
+ const system = orchestrator.system;
167
+ expect(system).toContain("Intelligently assign tasks");
168
+ expect(system).toContain("specialized agents");
169
+ });
170
+ });
171
+
172
+ describe("Session Management", () => {
173
+ it("should emphasize session lifecycle management", () => {
174
+ const system = orchestrator.system;
175
+ expect(system).toContain("Session Management");
176
+ expect(system).toContain("session lifecycle");
177
+ expect(system).toContain("state coordination");
178
+ expect(system).toContain("cross-session operations");
179
+ });
180
+ });
181
+
182
+ describe("Conflict Resolution", () => {
183
+ it("should specify conflict resolution capabilities", () => {
184
+ const system = orchestrator.system;
185
+ expect(system).toContain("Conflict Resolution");
186
+ expect(system).toContain("Mediate between conflicting");
187
+ expect(system).toContain("subagent recommendations");
188
+ expect(system).toContain("architectural decisions");
189
+ });
190
+ });
191
+
192
+ describe("Completion Guarantee", () => {
193
+ it("should ensure completion guarantee", () => {
194
+ const system = orchestrator.system;
195
+ expect(system).toContain("Completion Guarantee");
196
+ expect(system).toContain("complete successfully");
197
+ expect(system).toContain("rollback capabilities");
198
+ });
199
+ });
200
+
201
+ describe("Performance Optimization", () => {
202
+ it("should specify performance optimization focus", () => {
203
+ const system = orchestrator.system;
204
+ expect(system).toContain("Performance Optimization");
205
+ expect(system).toContain("parallel execution");
206
+ expect(system).toContain("maximum efficiency");
207
+ });
208
+ });
209
+
210
+ describe("Error Recovery", () => {
211
+ it("should implement comprehensive error handling", () => {
212
+ const system = orchestrator.system;
213
+ expect(system).toContain("Error Recovery");
214
+ expect(system).toContain("comprehensive error handling");
215
+ expect(system).toContain("recovery strategies");
216
+ });
217
+ });
218
+
219
+ describe("Orchestration Goal", () => {
220
+ it("should define clear orchestration goal", () => {
221
+ const system = orchestrator.system;
222
+ expect(system).toContain("flawlessly coordinate");
223
+ expect(system).toContain("StringRay Framework operations");
224
+ expect(system).toContain("intelligent orchestration");
225
+ expect(system).toContain("delegation");
226
+ });
227
+ });
228
+ });