@output.ai/cli 0.0.3 → 0.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.
@@ -22,6 +22,16 @@ const AGENT_CONFIGS = {
22
22
  type: 'template',
23
23
  from: 'commands/plan_workflow.md.template',
24
24
  to: '.outputai/commands/plan_workflow.md'
25
+ },
26
+ {
27
+ type: 'template',
28
+ from: 'meta/pre_flight.md.template',
29
+ to: '.outputai/meta/pre_flight.md'
30
+ },
31
+ {
32
+ type: 'template',
33
+ from: 'meta/post_flight.md.template',
34
+ to: '.outputai/meta/post_flight.md'
25
35
  }
26
36
  ]
27
37
  },
@@ -77,7 +87,7 @@ export default class Init extends Command {
77
87
  this.log('✅ Agent configuration initialized successfully!');
78
88
  this.log('');
79
89
  this.log('Created:');
80
- this.log(' • .outputai/ directory with agent and command configurations');
90
+ this.log(' • .outputai/ directory with agent, command, and meta configurations');
81
91
  this.log(' • .claude/ directory with symlinks for Claude Code integration');
82
92
  this.log('');
83
93
  this.log('Claude Code will automatically detect and use these configurations.');
@@ -86,6 +86,7 @@ describe('agents init', () => {
86
86
  expect(mockMkdir).toHaveBeenCalledWith(expect.stringContaining('.outputai'), expect.objectContaining({ recursive: true }));
87
87
  expect(mockMkdir).toHaveBeenCalledWith(expect.stringContaining('.outputai/agents'), expect.objectContaining({ recursive: true }));
88
88
  expect(mockMkdir).toHaveBeenCalledWith(expect.stringContaining('.outputai/commands'), expect.objectContaining({ recursive: true }));
89
+ expect(mockMkdir).toHaveBeenCalledWith(expect.stringContaining('.outputai/meta'), expect.objectContaining({ recursive: true }));
89
90
  });
90
91
  it('should create .claude directory structure', async () => {
91
92
  const mockMkdir = vi.mocked(fs.mkdir);
@@ -133,6 +134,19 @@ describe('agents init', () => {
133
134
  expect(mockWriteFile).toHaveBeenCalledWith(file, expect.any(String), 'utf-8');
134
135
  }
135
136
  });
137
+ it('should create all meta configuration files', async () => {
138
+ const mockWriteFile = vi.mocked(fs.writeFile);
139
+ const cmd = createTestCommand();
140
+ cmd.parse.mockResolvedValue({ flags: { 'agent-provider': 'claude-code', force: false }, args: {} });
141
+ await cmd.run();
142
+ const metaFiles = [
143
+ '.outputai/meta/pre_flight.md',
144
+ '.outputai/meta/post_flight.md'
145
+ ];
146
+ for (const file of metaFiles) {
147
+ expect(mockWriteFile).toHaveBeenCalledWith(file, expect.any(String), 'utf-8');
148
+ }
149
+ });
136
150
  });
137
151
  describe('symlink creation', () => {
138
152
  it('should create symlink from CLAUDE.md to .outputai/AGENTS.md', async () => {
@@ -203,6 +217,44 @@ describe('agents init', () => {
203
217
  expect(cmd.error).not.toHaveBeenCalled();
204
218
  });
205
219
  });
220
+ describe('complete initialization', () => {
221
+ it('should create all required files and directories', async () => {
222
+ const mockMkdir = vi.mocked(fs.mkdir);
223
+ const mockWriteFile = vi.mocked(fs.writeFile);
224
+ const mockSymlink = vi.mocked(fs.symlink);
225
+ const cmd = createTestCommand();
226
+ cmd.parse.mockResolvedValue({ flags: { 'agent-provider': 'claude-code', force: false }, args: {} });
227
+ await cmd.run();
228
+ // Verify all expected directories are created
229
+ const expectedDirs = [
230
+ '.outputai',
231
+ '.outputai/agents',
232
+ '.outputai/commands',
233
+ '.outputai/meta',
234
+ '.claude',
235
+ '.claude/agents',
236
+ '.claude/commands'
237
+ ];
238
+ for (const dir of expectedDirs) {
239
+ expect(mockMkdir).toHaveBeenCalledWith(expect.stringContaining(dir), expect.objectContaining({ recursive: true }));
240
+ }
241
+ // Verify all expected template files are created
242
+ const expectedFiles = [
243
+ '.outputai/AGENTS.md',
244
+ '.outputai/agents/workflow_planner.md',
245
+ '.outputai/commands/plan_workflow.md',
246
+ '.outputai/meta/pre_flight.md',
247
+ '.outputai/meta/post_flight.md'
248
+ ];
249
+ for (const file of expectedFiles) {
250
+ expect(mockWriteFile).toHaveBeenCalledWith(file, expect.any(String), 'utf-8');
251
+ }
252
+ // Verify symlinks are created
253
+ expect(mockSymlink).toHaveBeenCalledWith('.outputai/AGENTS.md', 'CLAUDE.md');
254
+ expect(mockSymlink).toHaveBeenCalledWith(expect.stringContaining('.outputai/agents/workflow_planner.md'), '.claude/agents/workflow_planner.md');
255
+ expect(mockSymlink).toHaveBeenCalledWith(expect.stringContaining('.outputai/commands/plan_workflow.md'), '.claude/commands/plan_workflow.md');
256
+ });
257
+ });
206
258
  describe('force flag', () => {
207
259
  it('should overwrite existing files when force flag is set', async () => {
208
260
  const mockWriteFile = vi.mocked(fs.writeFile);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@output.ai/cli",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "description": "CLI for Output.ai workflow generation",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",