opencode-conductor-cdd-plugin 1.0.0-beta.15 → 1.0.0-beta.16

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.
@@ -0,0 +1,143 @@
1
+ import { describe, it, expect } from 'vitest';
2
+ import { getSynergyStatus, formatSynergyStatus } from './synergyStatus.js';
3
+ describe('Synergy Status', () => {
4
+ describe('getSynergyStatus', () => {
5
+ it('should return status with oh-my-opencode framework', () => {
6
+ const status = getSynergyStatus('/fake/dir', {
7
+ framework: 'oh-my-opencode',
8
+ detectedAt: new Date('2026-01-19T14:00:00Z'),
9
+ availableAgents: [],
10
+ lastCheck: new Date('2026-01-19T14:00:00Z'),
11
+ });
12
+ expect(status.framework).toBe('oh-my-opencode');
13
+ expect(status.isActive).toBe(true);
14
+ expect(status.availableAgents).toEqual([]);
15
+ expect(status.detectedAt).toBeInstanceOf(Date);
16
+ });
17
+ it('should return status with oh-my-opencode-slim framework', () => {
18
+ const status = getSynergyStatus('/fake/dir', {
19
+ framework: 'oh-my-opencode-slim',
20
+ detectedAt: new Date('2026-01-19T14:00:00Z'),
21
+ availableAgents: ['explorer', 'designer', 'librarian'],
22
+ lastCheck: new Date('2026-01-19T14:00:00Z'),
23
+ });
24
+ expect(status.framework).toBe('oh-my-opencode-slim');
25
+ expect(status.isActive).toBe(true);
26
+ expect(status.availableAgents).toHaveLength(3);
27
+ expect(status.availableAgents).toContain('explorer');
28
+ });
29
+ it('should return inactive status when no framework', () => {
30
+ const status = getSynergyStatus('/fake/dir', {
31
+ framework: 'none',
32
+ detectedAt: new Date('2026-01-19T14:00:00Z'),
33
+ availableAgents: [],
34
+ lastCheck: new Date('2026-01-19T14:00:00Z'),
35
+ });
36
+ expect(status.framework).toBe('none');
37
+ expect(status.isActive).toBe(false);
38
+ expect(status.availableAgents).toEqual([]);
39
+ });
40
+ it('should include working directory in status', () => {
41
+ const workingDir = '/test/project';
42
+ const status = getSynergyStatus(workingDir, {
43
+ framework: 'oh-my-opencode-slim',
44
+ detectedAt: new Date(),
45
+ availableAgents: [],
46
+ lastCheck: new Date(),
47
+ });
48
+ expect(status.workingDir).toBe(workingDir);
49
+ });
50
+ it('should include detection timestamp', () => {
51
+ const detectedAt = new Date('2026-01-19T14:30:00Z');
52
+ const status = getSynergyStatus('/fake/dir', {
53
+ framework: 'oh-my-opencode',
54
+ detectedAt,
55
+ availableAgents: [],
56
+ lastCheck: new Date(),
57
+ });
58
+ expect(status.detectedAt).toBe(detectedAt);
59
+ });
60
+ });
61
+ describe('formatSynergyStatus', () => {
62
+ it('should format status for oh-my-opencode', () => {
63
+ const status = {
64
+ framework: 'oh-my-opencode',
65
+ isActive: true,
66
+ availableAgents: [],
67
+ workingDir: '/test/project',
68
+ detectedAt: new Date('2026-01-19T14:00:00Z'),
69
+ };
70
+ const formatted = formatSynergyStatus(status);
71
+ expect(formatted).toContain('Synergy Framework: oh-my-opencode');
72
+ expect(formatted).toContain('Status: Active');
73
+ expect(formatted).toContain('Working Directory: /test/project');
74
+ expect(formatted).toContain('Detected At:');
75
+ });
76
+ it('should format status for oh-my-opencode-slim with agents', () => {
77
+ const status = {
78
+ framework: 'oh-my-opencode-slim',
79
+ isActive: true,
80
+ availableAgents: ['explorer', 'designer', 'librarian'],
81
+ workingDir: '/test/project',
82
+ detectedAt: new Date('2026-01-19T14:00:00Z'),
83
+ };
84
+ const formatted = formatSynergyStatus(status);
85
+ expect(formatted).toContain('Synergy Framework: oh-my-opencode-slim');
86
+ expect(formatted).toContain('Status: Active');
87
+ expect(formatted).toContain('Available Agents (3):');
88
+ expect(formatted).toContain('- explorer');
89
+ expect(formatted).toContain('- designer');
90
+ expect(formatted).toContain('- librarian');
91
+ });
92
+ it('should format inactive status', () => {
93
+ const status = {
94
+ framework: 'none',
95
+ isActive: false,
96
+ availableAgents: [],
97
+ workingDir: '/test/project',
98
+ detectedAt: new Date('2026-01-19T14:00:00Z'),
99
+ };
100
+ const formatted = formatSynergyStatus(status);
101
+ expect(formatted).toContain('Synergy Framework: none');
102
+ expect(formatted).toContain('Status: Inactive');
103
+ expect(formatted).toContain('No synergy framework detected');
104
+ });
105
+ it('should handle empty agents list for active framework', () => {
106
+ const status = {
107
+ framework: 'oh-my-opencode',
108
+ isActive: true,
109
+ availableAgents: [],
110
+ workingDir: '/test/project',
111
+ detectedAt: new Date('2026-01-19T14:00:00Z'),
112
+ };
113
+ const formatted = formatSynergyStatus(status);
114
+ expect(formatted).toContain('oh-my-opencode');
115
+ expect(formatted).toContain('Active');
116
+ // Should not show agent list for oh-my-opencode (doesn't expose agents)
117
+ expect(formatted).not.toContain('Available Agents');
118
+ });
119
+ it('should format timestamps in readable format', () => {
120
+ const status = {
121
+ framework: 'oh-my-opencode-slim',
122
+ isActive: true,
123
+ availableAgents: [],
124
+ workingDir: '/test/project',
125
+ detectedAt: new Date('2026-01-19T14:30:45.123Z'),
126
+ };
127
+ const formatted = formatSynergyStatus(status);
128
+ expect(formatted).toContain('Detected At:');
129
+ expect(formatted).toMatch(/\d{4}-\d{2}-\d{2}/); // Should contain date
130
+ });
131
+ it('should show agent count correctly', () => {
132
+ const status = {
133
+ framework: 'oh-my-opencode-slim',
134
+ isActive: true,
135
+ availableAgents: ['explorer'],
136
+ workingDir: '/test/project',
137
+ detectedAt: new Date(),
138
+ };
139
+ const formatted = formatSynergyStatus(status);
140
+ expect(formatted).toContain('Available Agents (1):');
141
+ });
142
+ });
143
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-conductor-cdd-plugin",
3
- "version": "1.0.0-beta.15",
3
+ "version": "1.0.0-beta.16",
4
4
  "description": "Context-Driven Development (CDD) plugin for OpenCode - Transform your AI coding workflow with structured specifications, plans, and implementation tracking",
5
5
  "type": "module",
6
6
  "repository": {