takt 0.1.7 → 0.2.0
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/README.md +136 -40
- package/dist/cli.js +11 -2
- package/dist/cli.js.map +1 -1
- package/dist/commands/addTask.d.ts +15 -0
- package/dist/commands/addTask.d.ts.map +1 -0
- package/dist/commands/addTask.js +101 -0
- package/dist/commands/addTask.js.map +1 -0
- package/dist/commands/help.d.ts.map +1 -1
- package/dist/commands/help.js +16 -5
- package/dist/commands/help.js.map +1 -1
- package/dist/commands/index.d.ts +3 -0
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +3 -0
- package/dist/commands/index.js.map +1 -1
- package/dist/commands/refreshBuiltin.d.ts +11 -0
- package/dist/commands/refreshBuiltin.d.ts.map +1 -0
- package/dist/commands/refreshBuiltin.js +37 -0
- package/dist/commands/refreshBuiltin.js.map +1 -0
- package/dist/commands/taskExecution.d.ts +9 -0
- package/dist/commands/taskExecution.d.ts.map +1 -1
- package/dist/commands/taskExecution.js +30 -2
- package/dist/commands/taskExecution.js.map +1 -1
- package/dist/commands/watchTasks.d.ts +12 -0
- package/dist/commands/watchTasks.d.ts.map +1 -0
- package/dist/commands/watchTasks.js +98 -0
- package/dist/commands/watchTasks.js.map +1 -0
- package/dist/resources/index.d.ts +5 -0
- package/dist/resources/index.d.ts.map +1 -1
- package/dist/resources/index.js +33 -9
- package/dist/resources/index.js.map +1 -1
- package/dist/task/display.d.ts.map +1 -1
- package/dist/task/display.js +19 -1
- package/dist/task/display.js.map +1 -1
- package/dist/task/index.d.ts +4 -0
- package/dist/task/index.d.ts.map +1 -1
- package/dist/task/index.js +4 -0
- package/dist/task/index.js.map +1 -1
- package/dist/task/parser.d.ts +33 -0
- package/dist/task/parser.d.ts.map +1 -0
- package/dist/task/parser.js +86 -0
- package/dist/task/parser.js.map +1 -0
- package/dist/task/runner.d.ts +6 -0
- package/dist/task/runner.d.ts.map +1 -1
- package/dist/task/runner.js +33 -42
- package/dist/task/runner.js.map +1 -1
- package/dist/task/schema.d.ts +32 -0
- package/dist/task/schema.d.ts.map +1 -0
- package/dist/task/schema.js +31 -0
- package/dist/task/schema.js.map +1 -0
- package/dist/task/watcher.d.ts +33 -0
- package/dist/task/watcher.d.ts.map +1 -0
- package/dist/task/watcher.js +69 -0
- package/dist/task/watcher.js.map +1 -0
- package/dist/task/worktree.d.ts +31 -0
- package/dist/task/worktree.d.ts.map +1 -0
- package/dist/task/worktree.js +112 -0
- package/dist/task/worktree.js.map +1 -0
- package/dist/utils/slug.d.ts +12 -0
- package/dist/utils/slug.d.ts.map +1 -0
- package/dist/utils/slug.js +18 -0
- package/dist/utils/slug.js.map +1 -0
- package/package.json +3 -2
- package/resources/global/ja/agents/default/architect.md +120 -0
- package/resources/global/ja/workflows/default.yaml +12 -0
package/README.md
CHANGED
|
@@ -26,22 +26,32 @@ npm install -g takt
|
|
|
26
26
|
# Run a task (will prompt for workflow selection)
|
|
27
27
|
takt "Add a login feature"
|
|
28
28
|
|
|
29
|
-
#
|
|
30
|
-
takt /
|
|
29
|
+
# Add a task to the queue
|
|
30
|
+
takt /add-task "Fix the login bug"
|
|
31
31
|
|
|
32
32
|
# Run all pending tasks
|
|
33
33
|
takt /run-tasks
|
|
34
|
+
|
|
35
|
+
# Watch for tasks and auto-execute
|
|
36
|
+
takt /watch
|
|
37
|
+
|
|
38
|
+
# Switch workflow
|
|
39
|
+
takt /switch
|
|
34
40
|
```
|
|
35
41
|
|
|
36
42
|
## Commands
|
|
37
43
|
|
|
38
44
|
| Command | Description |
|
|
39
45
|
|---------|-------------|
|
|
40
|
-
| `takt "task"` | Execute task with workflow
|
|
46
|
+
| `takt "task"` | Execute task with current workflow (continues session) |
|
|
41
47
|
| `takt -r "task"` | Execute task, resuming previous session |
|
|
42
|
-
| `takt /run-tasks` | Run all pending tasks |
|
|
48
|
+
| `takt /run-tasks` | Run all pending tasks from `.takt/tasks/` |
|
|
49
|
+
| `takt /watch` | Watch `.takt/tasks/` and auto-execute tasks (stays resident) |
|
|
50
|
+
| `takt /add-task` | Add a new task interactively (YAML format) |
|
|
43
51
|
| `takt /switch` | Switch workflow interactively |
|
|
44
52
|
| `takt /clear` | Clear agent conversation sessions |
|
|
53
|
+
| `takt /refresh-builtin` | Update builtin agents/workflows to latest version |
|
|
54
|
+
| `takt /config` | Display current configuration |
|
|
45
55
|
| `takt /help` | Show help |
|
|
46
56
|
|
|
47
57
|
## Workflows
|
|
@@ -88,11 +98,28 @@ steps:
|
|
|
88
98
|
next_step: implement
|
|
89
99
|
```
|
|
90
100
|
|
|
101
|
+
## Built-in Workflows
|
|
102
|
+
|
|
103
|
+
TAKT ships with several built-in workflows:
|
|
104
|
+
|
|
105
|
+
| Workflow | Description |
|
|
106
|
+
|----------|-------------|
|
|
107
|
+
| `default` | Full development workflow: plan → implement → architect review → AI review → security review → supervisor approval. Includes fix loops for each review stage. |
|
|
108
|
+
| `simple` | Simplified version of default: plan → implement → architect review → AI review → supervisor. No intermediate fix steps. |
|
|
109
|
+
| `research` | Research workflow: planner → digger → supervisor. Autonomously researches topics without asking questions. |
|
|
110
|
+
| `expert-review` | Comprehensive review with domain experts: CQRS+ES, Frontend, AI, Security, QA reviews with fix loops. |
|
|
111
|
+
| `magi` | Deliberation system inspired by Evangelion. Three AI personas (MELCHIOR, BALTHASAR, CASPER) analyze and vote. |
|
|
112
|
+
|
|
113
|
+
Switch between workflows with `takt /switch`.
|
|
114
|
+
|
|
91
115
|
## Built-in Agents
|
|
92
116
|
|
|
93
117
|
- **coder** - Implements features and fixes bugs
|
|
94
118
|
- **architect** - Reviews code and provides feedback
|
|
95
119
|
- **supervisor** - Final verification and approval
|
|
120
|
+
- **planner** - Task analysis and implementation planning
|
|
121
|
+
- **ai-reviewer** - AI-generated code quality review
|
|
122
|
+
- **security** - Security vulnerability assessment
|
|
96
123
|
|
|
97
124
|
## Custom Agents
|
|
98
125
|
|
|
@@ -149,6 +176,14 @@ Available Codex models:
|
|
|
149
176
|
├── config.yaml # Global config (provider, model, workflows, etc.)
|
|
150
177
|
├── workflows/ # Workflow definitions
|
|
151
178
|
└── agents/ # Agent prompt files
|
|
179
|
+
|
|
180
|
+
.takt/ # Project-level config
|
|
181
|
+
├── agents.yaml # Custom agent definitions
|
|
182
|
+
├── tasks/ # Pending task files (.yaml, .md)
|
|
183
|
+
├── completed/ # Completed tasks with reports
|
|
184
|
+
├── worktrees/ # Git worktrees for isolated task execution
|
|
185
|
+
├── reports/ # Execution reports (auto-generated)
|
|
186
|
+
└── logs/ # Session logs
|
|
152
187
|
```
|
|
153
188
|
|
|
154
189
|
### Global Configuration
|
|
@@ -189,22 +224,6 @@ takt -r "The bug occurs when the password contains special characters"
|
|
|
189
224
|
|
|
190
225
|
The `-r` flag preserves the agent's conversation history, allowing for natural back-and-forth interaction.
|
|
191
226
|
|
|
192
|
-
### Playing with MAGI System
|
|
193
|
-
|
|
194
|
-
MAGI is a deliberation system inspired by Evangelion. Three AI personas analyze your question from different perspectives and vote:
|
|
195
|
-
|
|
196
|
-
```bash
|
|
197
|
-
# Select 'magi' workflow when prompted
|
|
198
|
-
takt "Should we migrate from REST to GraphQL?"
|
|
199
|
-
```
|
|
200
|
-
|
|
201
|
-
The three MAGI personas:
|
|
202
|
-
- **MELCHIOR-1** (Scientist): Logical, data-driven analysis
|
|
203
|
-
- **BALTHASAR-2** (Nurturer): Team and human-centered perspective
|
|
204
|
-
- **CASPER-3** (Pragmatist): Practical, real-world considerations
|
|
205
|
-
|
|
206
|
-
Each persona votes: APPROVE, REJECT, or CONDITIONAL. The final decision is made by majority vote.
|
|
207
|
-
|
|
208
227
|
### Adding Custom Workflows
|
|
209
228
|
|
|
210
229
|
Create your own workflow by adding YAML files to `~/.takt/workflows/`:
|
|
@@ -268,27 +287,33 @@ You are a code reviewer focused on security.
|
|
|
268
287
|
- [REVIEWER:REJECT] if issues found (list them)
|
|
269
288
|
```
|
|
270
289
|
|
|
271
|
-
###
|
|
290
|
+
### Task Management
|
|
291
|
+
|
|
292
|
+
TAKT supports batch task processing through task files in `.takt/tasks/`. Both `.yaml`/`.yml` and `.md` file formats are supported.
|
|
272
293
|
|
|
273
|
-
|
|
294
|
+
#### Adding Tasks with `/add-task`
|
|
274
295
|
|
|
275
296
|
```bash
|
|
276
|
-
#
|
|
277
|
-
|
|
278
|
-
echo "Refactor the database layer" > .takt/tasks/002-refactor-db.md
|
|
279
|
-
echo "Update API documentation" > .takt/tasks/003-update-docs.md
|
|
297
|
+
# Quick add (no worktree)
|
|
298
|
+
takt /add-task "Add authentication feature"
|
|
280
299
|
|
|
281
|
-
#
|
|
282
|
-
takt /
|
|
300
|
+
# Interactive mode (prompts for worktree, branch, workflow options)
|
|
301
|
+
takt /add-task
|
|
283
302
|
```
|
|
284
303
|
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
- Completed tasks are moved to `.takt/completed/` with execution reports
|
|
289
|
-
- New tasks added during execution will be picked up dynamically
|
|
304
|
+
#### Task File Formats
|
|
305
|
+
|
|
306
|
+
**YAML format** (recommended, supports worktree/branch/workflow options):
|
|
290
307
|
|
|
291
|
-
|
|
308
|
+
```yaml
|
|
309
|
+
# .takt/tasks/add-auth.yaml
|
|
310
|
+
task: "Add authentication feature"
|
|
311
|
+
worktree: true # Run in isolated git worktree
|
|
312
|
+
branch: "feat/add-auth" # Branch name (auto-generated if omitted)
|
|
313
|
+
workflow: "default" # Workflow override (uses current if omitted)
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
**Markdown format** (simple, backward compatible):
|
|
292
317
|
|
|
293
318
|
```markdown
|
|
294
319
|
# .takt/tasks/add-login-feature.md
|
|
@@ -301,10 +326,35 @@ Requirements:
|
|
|
301
326
|
- Error handling for failed attempts
|
|
302
327
|
```
|
|
303
328
|
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
329
|
+
#### Git Worktree Isolation
|
|
330
|
+
|
|
331
|
+
YAML task files can specify `worktree` to run each task in an isolated git worktree, keeping the main working directory clean:
|
|
332
|
+
|
|
333
|
+
- `worktree: true` - Auto-create at `.takt/worktrees/{timestamp}-{task-slug}/`
|
|
334
|
+
- `worktree: "/path/to/dir"` - Create at specified path
|
|
335
|
+
- `branch: "feat/xxx"` - Use specified branch (auto-generated as `takt/{timestamp}-{slug}` if omitted)
|
|
336
|
+
- Omit `worktree` - Run in current working directory (default)
|
|
337
|
+
|
|
338
|
+
#### Running Tasks with `/run-tasks`
|
|
339
|
+
|
|
340
|
+
```bash
|
|
341
|
+
takt /run-tasks
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
- Tasks are executed in alphabetical order (use prefixes like `001-`, `002-` for ordering)
|
|
345
|
+
- Completed tasks are moved to `.takt/completed/` with execution reports
|
|
346
|
+
- New tasks added during execution will be picked up dynamically
|
|
347
|
+
|
|
348
|
+
#### Watching Tasks with `/watch`
|
|
349
|
+
|
|
350
|
+
```bash
|
|
351
|
+
takt /watch
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
Watch mode polls `.takt/tasks/` for new task files and auto-executes them as they appear. The process stays resident until `Ctrl+C`. This is useful for:
|
|
355
|
+
- CI/CD pipelines that generate task files
|
|
356
|
+
- Automated workflows where tasks are added by external processes
|
|
357
|
+
- Long-running development sessions where tasks are queued over time
|
|
308
358
|
|
|
309
359
|
### Workflow Variables
|
|
310
360
|
|
|
@@ -313,11 +363,56 @@ Available variables in `instruction_template`:
|
|
|
313
363
|
| Variable | Description |
|
|
314
364
|
|----------|-------------|
|
|
315
365
|
| `{task}` | Original user request |
|
|
316
|
-
| `{iteration}` |
|
|
317
|
-
| `{max_iterations}` | Maximum iterations |
|
|
366
|
+
| `{iteration}` | Workflow-wide turn count (total steps executed) |
|
|
367
|
+
| `{max_iterations}` | Maximum iterations allowed |
|
|
368
|
+
| `{step_iteration}` | Per-step iteration count (how many times THIS step has run) |
|
|
318
369
|
| `{previous_response}` | Previous step's output (requires `pass_previous_response: true`) |
|
|
319
370
|
| `{user_inputs}` | Additional user inputs during workflow |
|
|
320
371
|
| `{git_diff}` | Current git diff (uncommitted changes) |
|
|
372
|
+
| `{report_dir}` | Report directory name (e.g., `20250126-143052-task-summary`) |
|
|
373
|
+
|
|
374
|
+
### Designing Workflows
|
|
375
|
+
|
|
376
|
+
Each workflow step requires three key elements:
|
|
377
|
+
|
|
378
|
+
**1. Agent** - A Markdown file containing the system prompt:
|
|
379
|
+
|
|
380
|
+
```yaml
|
|
381
|
+
agent: ~/.takt/agents/default/coder.md # Path to agent prompt file
|
|
382
|
+
agent_name: coder # Display name (optional)
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
**2. Status Rules** - Define how the agent signals completion. Agents output status markers like `[CODER:DONE]` or `[ARCHITECT:REJECT]` that TAKT detects to drive transitions:
|
|
386
|
+
|
|
387
|
+
```yaml
|
|
388
|
+
status_rules_prompt: |
|
|
389
|
+
Your final output MUST include a status tag:
|
|
390
|
+
- `[CODER:DONE]` if implementation is complete
|
|
391
|
+
- `[CODER:BLOCKED]` if you cannot proceed
|
|
392
|
+
```
|
|
393
|
+
|
|
394
|
+
**3. Transitions** - Route to the next step based on status:
|
|
395
|
+
|
|
396
|
+
```yaml
|
|
397
|
+
transitions:
|
|
398
|
+
- condition: done # Maps to status tag DONE
|
|
399
|
+
next_step: review # Go to review step
|
|
400
|
+
- condition: blocked # Maps to status tag BLOCKED
|
|
401
|
+
next_step: ABORT # End workflow with failure
|
|
402
|
+
```
|
|
403
|
+
|
|
404
|
+
Available transition conditions: `done`, `blocked`, `approved`, `rejected`, `improve`, `always`.
|
|
405
|
+
Special next_step values: `COMPLETE` (success), `ABORT` (failure).
|
|
406
|
+
|
|
407
|
+
**Step options:**
|
|
408
|
+
|
|
409
|
+
| Option | Default | Description |
|
|
410
|
+
|--------|---------|-------------|
|
|
411
|
+
| `pass_previous_response` | `true` | Pass previous step's output to `{previous_response}` |
|
|
412
|
+
| `on_no_status` | - | Behavior when no status is detected: `complete`, `continue`, `stay` |
|
|
413
|
+
| `allowed_tools` | - | List of tools the agent can use (Read, Glob, Grep, Edit, Write, Bash, etc.) |
|
|
414
|
+
| `provider` | - | Override provider for this step (`claude` or `codex`) |
|
|
415
|
+
| `model` | - | Override model for this step |
|
|
321
416
|
|
|
322
417
|
## API Usage
|
|
323
418
|
|
|
@@ -375,6 +470,7 @@ This ensures the project works correctly in a clean Node.js 20 environment.
|
|
|
375
470
|
- [Agent Guide](./docs/agents.md) - Configure custom agents
|
|
376
471
|
- [Changelog](./CHANGELOG.md) - Version history
|
|
377
472
|
- [Security Policy](./SECURITY.md) - Vulnerability reporting
|
|
473
|
+
- [Blog: TAKT - AI Agent Orchestration](https://zenn.dev/nrs/articles/c6842288a526d7) - Design philosophy and practical usage guide (Japanese)
|
|
378
474
|
|
|
379
475
|
## License
|
|
380
476
|
|
package/dist/cli.js
CHANGED
|
@@ -16,7 +16,7 @@ import { initGlobalDirs, initProjectDirs, loadGlobalConfig, getEffectiveDebugCon
|
|
|
16
16
|
import { clearAgentSessions, getCurrentWorkflow, isVerboseMode } from './config/paths.js';
|
|
17
17
|
import { info, error, success, setLogLevel } from './utils/ui.js';
|
|
18
18
|
import { initDebugLogger, createLogger } from './utils/debug.js';
|
|
19
|
-
import { executeTask, runAllTasks, showHelp, switchWorkflow, switchConfig, } from './commands/index.js';
|
|
19
|
+
import { executeTask, runAllTasks, showHelp, switchWorkflow, switchConfig, addTask, refreshBuiltin, watchTasks, } from './commands/index.js';
|
|
20
20
|
import { listWorkflows } from './config/workflowLoader.js';
|
|
21
21
|
import { selectOptionWithDefault } from './prompt/index.js';
|
|
22
22
|
import { DEFAULT_WORKFLOW_NAME } from './constants.js';
|
|
@@ -76,9 +76,18 @@ program
|
|
|
76
76
|
case 'config':
|
|
77
77
|
await switchConfig(cwd, args[0]);
|
|
78
78
|
return;
|
|
79
|
+
case 'add-task':
|
|
80
|
+
await addTask(cwd, args);
|
|
81
|
+
return;
|
|
82
|
+
case 'refresh-builtin':
|
|
83
|
+
await refreshBuiltin();
|
|
84
|
+
return;
|
|
85
|
+
case 'watch':
|
|
86
|
+
await watchTasks(cwd);
|
|
87
|
+
return;
|
|
79
88
|
default:
|
|
80
89
|
error(`Unknown command: /${command}`);
|
|
81
|
-
info('Available: /run-tasks, /switch, /clear, /help, /config');
|
|
90
|
+
info('Available: /run-tasks, /watch, /add-task, /switch, /clear, /refresh-builtin, /help, /config');
|
|
82
91
|
process.exit(1);
|
|
83
92
|
}
|
|
84
93
|
}
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EACL,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,uBAAuB,GACxB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAC1F,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,EACL,WAAW,EACX,WAAW,EACX,QAAQ,EACR,cAAc,EACd,YAAY,
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EACL,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,uBAAuB,GACxB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,kBAAkB,EAAE,kBAAkB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CAAC,eAAe;gBACjB,CAAC,CAAC,CAAC,kBAAkB,CAAC,QAAQ,CAAC,qBAAqB,CAAC;oBACjD,CAAC,CAAC,qBAAqB;oBACvB,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,IAAI,qBAAqB,CAAC,CAAC;YAExD,gBAAgB,GAAG,MAAM,uBAAuB,CAC9C,kBAAkB,EAClB,OAAO,EACP,eAAe,CAChB,CAAC;QACJ,CAAC;QAED,GAAG,CAAC,IAAI,CAAC,yBAAyB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,gBAAgB,EAAE,CAAC,CAAC;QAC1E,MAAM,WAAW,GAAG,MAAM,WAAW,CAAC,IAAI,EAAE,GAAG,EAAE,gBAAgB,CAAC,CAAC;QACnE,IAAI,CAAC,WAAW,EAAE,CAAC;YACjB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;QACD,OAAO;IACT,CAAC;IAED,+BAA+B;IAC/B,QAAQ,EAAE,CAAC;AACb,CAAC,CAAC,CAAC;AAEL,OAAO,CAAC,KAAK,EAAE,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* /add-task command implementation
|
|
3
|
+
*
|
|
4
|
+
* Creates a new task file in .takt/tasks/ with YAML format.
|
|
5
|
+
* Supports worktree and branch options.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* /add-task command handler
|
|
9
|
+
*
|
|
10
|
+
* Usage:
|
|
11
|
+
* takt /add-task "タスク内容" # Quick add (no worktree)
|
|
12
|
+
* takt /add-task # Interactive mode
|
|
13
|
+
*/
|
|
14
|
+
export declare function addTask(cwd: string, args: string[]): Promise<void>;
|
|
15
|
+
//# sourceMappingURL=addTask.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"addTask.d.ts","sourceRoot":"","sources":["../../src/commands/addTask.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AA8BH;;;;;;GAMG;AACH,wBAAsB,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAwExE"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* /add-task command implementation
|
|
3
|
+
*
|
|
4
|
+
* Creates a new task file in .takt/tasks/ with YAML format.
|
|
5
|
+
* Supports worktree and branch options.
|
|
6
|
+
*/
|
|
7
|
+
import * as fs from 'node:fs';
|
|
8
|
+
import * as path from 'node:path';
|
|
9
|
+
import { stringify as stringifyYaml } from 'yaml';
|
|
10
|
+
import { promptInput, confirm } from '../prompt/index.js';
|
|
11
|
+
import { success, info } from '../utils/ui.js';
|
|
12
|
+
import { slugify } from '../utils/slug.js';
|
|
13
|
+
import { createLogger } from '../utils/debug.js';
|
|
14
|
+
const log = createLogger('add-task');
|
|
15
|
+
/**
|
|
16
|
+
* Generate a unique task filename
|
|
17
|
+
*/
|
|
18
|
+
function generateFilename(tasksDir, taskContent) {
|
|
19
|
+
const slug = slugify(taskContent);
|
|
20
|
+
const base = slug || 'task';
|
|
21
|
+
let filename = `${base}.yaml`;
|
|
22
|
+
let counter = 1;
|
|
23
|
+
while (fs.existsSync(path.join(tasksDir, filename))) {
|
|
24
|
+
filename = `${base}-${counter}.yaml`;
|
|
25
|
+
counter++;
|
|
26
|
+
}
|
|
27
|
+
return filename;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* /add-task command handler
|
|
31
|
+
*
|
|
32
|
+
* Usage:
|
|
33
|
+
* takt /add-task "タスク内容" # Quick add (no worktree)
|
|
34
|
+
* takt /add-task # Interactive mode
|
|
35
|
+
*/
|
|
36
|
+
export async function addTask(cwd, args) {
|
|
37
|
+
const tasksDir = path.join(cwd, '.takt', 'tasks');
|
|
38
|
+
fs.mkdirSync(tasksDir, { recursive: true });
|
|
39
|
+
let taskContent;
|
|
40
|
+
let worktree;
|
|
41
|
+
let branch;
|
|
42
|
+
let workflow;
|
|
43
|
+
if (args.length > 0) {
|
|
44
|
+
// Argument mode: task content provided directly
|
|
45
|
+
taskContent = args.join(' ');
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
// Interactive mode
|
|
49
|
+
const input = await promptInput('Task content');
|
|
50
|
+
if (!input) {
|
|
51
|
+
info('Cancelled.');
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
taskContent = input;
|
|
55
|
+
}
|
|
56
|
+
// Ask about worktree
|
|
57
|
+
const useWorktree = await confirm('Create worktree?', false);
|
|
58
|
+
if (useWorktree) {
|
|
59
|
+
const customPath = await promptInput('Worktree path (Enter for auto)');
|
|
60
|
+
worktree = customPath || true;
|
|
61
|
+
// Ask about branch
|
|
62
|
+
const customBranch = await promptInput('Branch name (Enter for auto)');
|
|
63
|
+
if (customBranch) {
|
|
64
|
+
branch = customBranch;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
// Ask about workflow
|
|
68
|
+
const customWorkflow = await promptInput('Workflow name (Enter for default)');
|
|
69
|
+
if (customWorkflow) {
|
|
70
|
+
workflow = customWorkflow;
|
|
71
|
+
}
|
|
72
|
+
// Build task data
|
|
73
|
+
const taskData = { task: taskContent };
|
|
74
|
+
if (worktree !== undefined) {
|
|
75
|
+
taskData.worktree = worktree;
|
|
76
|
+
}
|
|
77
|
+
if (branch) {
|
|
78
|
+
taskData.branch = branch;
|
|
79
|
+
}
|
|
80
|
+
if (workflow) {
|
|
81
|
+
taskData.workflow = workflow;
|
|
82
|
+
}
|
|
83
|
+
// Write YAML filea
|
|
84
|
+
const filename = generateFilename(tasksDir, taskContent);
|
|
85
|
+
const filePath = path.join(tasksDir, filename);
|
|
86
|
+
const yamlContent = stringifyYaml(taskData);
|
|
87
|
+
fs.writeFileSync(filePath, yamlContent, 'utf-8');
|
|
88
|
+
log.info('Task created', { filePath, taskData });
|
|
89
|
+
success(`Task created: ${filename}`);
|
|
90
|
+
info(` Path: ${filePath}`);
|
|
91
|
+
if (worktree) {
|
|
92
|
+
info(` Worktree: ${typeof worktree === 'string' ? worktree : 'auto'}`);
|
|
93
|
+
}
|
|
94
|
+
if (branch) {
|
|
95
|
+
info(` Branch: ${branch}`);
|
|
96
|
+
}
|
|
97
|
+
if (workflow) {
|
|
98
|
+
info(` Workflow: ${workflow}`);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
//# sourceMappingURL=addTask.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"addTask.js","sourceRoot":"","sources":["../../src/commands/addTask.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,MAAM,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGjD,MAAM,GAAG,GAAG,YAAY,CAAC,UAAU,CAAC,CAAC;AAErC;;GAEG;AACH,SAAS,gBAAgB,CAAC,QAAgB,EAAE,WAAmB;IAC7D,MAAM,IAAI,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAClC,MAAM,IAAI,GAAG,IAAI,IAAI,MAAM,CAAC;IAC5B,IAAI,QAAQ,GAAG,GAAG,IAAI,OAAO,CAAC;IAC9B,IAAI,OAAO,GAAG,CAAC,CAAC;IAEhB,OAAO,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,EAAE,CAAC;QACpD,QAAQ,GAAG,GAAG,IAAI,IAAI,OAAO,OAAO,CAAC;Q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C,eAAe,QAAQ,EAAE,CAAC,CAAC;IAClC,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../../src/commands/help.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH;;GAEG;AACH,wBAAgB,QAAQ,IAAI,IAAI,
|
|
1
|
+
{"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../../src/commands/help.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH;;GAEG;AACH,wBAAgB,QAAQ,IAAI,IAAI,CAsC/B"}
|
package/dist/commands/help.js
CHANGED
|
@@ -10,18 +10,29 @@ export function showHelp() {
|
|
|
10
10
|
header('TAKT - Task Agent Koordination Tool');
|
|
11
11
|
console.log(`
|
|
12
12
|
Usage:
|
|
13
|
-
takt {task}
|
|
14
|
-
takt /run-tasks
|
|
15
|
-
takt /
|
|
16
|
-
takt /
|
|
17
|
-
takt /
|
|
13
|
+
takt {task} Execute task with current workflow (continues session)
|
|
14
|
+
takt /run-tasks Run all pending tasks from .takt/tasks/
|
|
15
|
+
takt /watch Watch for tasks and auto-execute (stays resident)
|
|
16
|
+
takt /add-task Add a new task (interactive, YAML format)
|
|
17
|
+
takt /switch Switch workflow interactively
|
|
18
|
+
takt /clear Clear agent conversation sessions (reset to initial state)
|
|
19
|
+
takt /refresh-builtin Overwrite builtin agents/workflows with latest version
|
|
20
|
+
takt /help Show this help
|
|
18
21
|
|
|
19
22
|
Examples:
|
|
20
23
|
takt "Fix the bug in main.ts" # Execute task (continues session)
|
|
24
|
+
takt /add-task "認証機能を追加する" # Quick add task
|
|
25
|
+
takt /add-task # Interactive task creation
|
|
21
26
|
takt /clear # Clear sessions, start fresh
|
|
27
|
+
takt /watch # Watch & auto-execute tasks
|
|
28
|
+
takt /refresh-builtin # Update builtin resources
|
|
22
29
|
takt /switch
|
|
23
30
|
takt /run-tasks
|
|
24
31
|
|
|
32
|
+
Task files (.takt/tasks/):
|
|
33
|
+
.md files Plain text tasks (backward compatible)
|
|
34
|
+
.yaml files Structured tasks with worktree/branch/workflow options
|
|
35
|
+
|
|
25
36
|
Configuration (.takt/config.yaml):
|
|
26
37
|
workflow: default # Current workflow
|
|
27
38
|
verbose: true # Enable verbose output
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"help.js","sourceRoot":"","sources":["../../src/commands/help.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD;;GAEG;AACH,MAAM,UAAU,QAAQ;IACtB,MAAM,CAAC,qCAAqC,CAAC,CAAC;IAE9C,OAAO,CAAC,GAAG,CAAC
|
|
1
|
+
{"version":3,"file":"help.js","sourceRoot":"","sources":["../../src/commands/help.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD;;GAEG;AACH,MAAM,UAAU,QAAQ;IACtB,MAAM,CAAC,qCAAqC,CAAC,CAAC;IAE9C,OAAO,CAAC,GAAG,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4Bb,CAAC,CAAC;IAED,iCAAiC;IACjC,MAAM,YAAY,GAAG,eAAe,EAAE,CAAC;IACvC,IAAI,YAAY,EAAE,CAAC;QACjB,IAAI,CAAC,cAAc,YAAY,EAAE,CAAC,CAAC;IACrC,CAAC;AACH,CAAC"}
|
package/dist/commands/index.d.ts
CHANGED
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export { executeWorkflow, type WorkflowExecutionResult, type WorkflowExecutionOptions } from './workflowExecution.js';
|
|
5
5
|
export { executeTask, runAllTasks } from './taskExecution.js';
|
|
6
|
+
export { addTask } from './addTask.js';
|
|
7
|
+
export { refreshBuiltin } from './refreshBuiltin.js';
|
|
8
|
+
export { watchTasks } from './watchTasks.js';
|
|
6
9
|
export { showHelp } from './help.js';
|
|
7
10
|
export { withAgentSession } from './session.js';
|
|
8
11
|
export { switchWorkflow } from './workflow.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,eAAe,EAAE,KAAK,uBAAuB,EAAE,KAAK,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AACtH,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,eAAe,EAAE,KAAK,uBAAuB,EAAE,KAAK,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AACtH,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/commands/index.js
CHANGED
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export { executeWorkflow } from './workflowExecution.js';
|
|
5
5
|
export { executeTask, runAllTasks } from './taskExecution.js';
|
|
6
|
+
export { addTask } from './addTask.js';
|
|
7
|
+
export { refreshBuiltin } from './refreshBuiltin.js';
|
|
8
|
+
export { watchTasks } from './watchTasks.js';
|
|
6
9
|
export { showHelp } from './help.js';
|
|
7
10
|
export { withAgentSession } from './session.js';
|
|
8
11
|
export { switchWorkflow } from './workflow.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,eAAe,EAA+D,MAAM,wBAAwB,CAAC;AACtH,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,wBAAwB,EAAE,iBAAiB,EAAuB,MAAM,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,eAAe,EAA+D,MAAM,wBAAwB,CAAC;AACtH,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,wBAAwB,EAAE,iBAAiB,EAAuB,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* /refresh-builtin command implementation
|
|
3
|
+
*
|
|
4
|
+
* Overwrites builtin workflow and agent files in ~/.takt/ with the latest
|
|
5
|
+
* embedded resources. Does NOT touch config.yaml or user-added files.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Refresh builtin agents and workflows to latest version.
|
|
9
|
+
*/
|
|
10
|
+
export declare function refreshBuiltin(): Promise<void>;
|
|
11
|
+
//# sourceMappingURL=refreshBuiltin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refreshBuiltin.d.ts","sourceRoot":"","sources":["../../src/commands/refreshBuiltin.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAUH;;GAEG;AACH,wBAAsB,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC,CAwBpD"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* /refresh-builtin command implementation
|
|
3
|
+
*
|
|
4
|
+
* Overwrites builtin workflow and agent files in ~/.takt/ with the latest
|
|
5
|
+
* embedded resources. Does NOT touch config.yaml or user-added files.
|
|
6
|
+
*/
|
|
7
|
+
import { getGlobalConfigDir } from '../config/paths.js';
|
|
8
|
+
import { getLanguage } from '../config/globalConfig.js';
|
|
9
|
+
import { forceRefreshLanguageResources } from '../resources/index.js';
|
|
10
|
+
import { header, success, info, error } from '../utils/ui.js';
|
|
11
|
+
import { createLogger } from '../utils/debug.js';
|
|
12
|
+
const log = createLogger('refresh-builtin');
|
|
13
|
+
/**
|
|
14
|
+
* Refresh builtin agents and workflows to latest version.
|
|
15
|
+
*/
|
|
16
|
+
export async function refreshBuiltin() {
|
|
17
|
+
const globalDir = getGlobalConfigDir();
|
|
18
|
+
const lang = getLanguage();
|
|
19
|
+
header('Refresh Builtin Resources');
|
|
20
|
+
info(`Language: ${lang}`);
|
|
21
|
+
info(`Target: ${globalDir}`);
|
|
22
|
+
try {
|
|
23
|
+
const overwritten = forceRefreshLanguageResources(globalDir, lang);
|
|
24
|
+
log.info('Builtin resources refreshed', { count: overwritten.length, lang });
|
|
25
|
+
console.log();
|
|
26
|
+
success(`${overwritten.length} files refreshed.`);
|
|
27
|
+
for (const filePath of overwritten) {
|
|
28
|
+
info(` ✓ ${filePath}`);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
catch (err) {
|
|
32
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
33
|
+
log.error('Failed to refresh builtin resources', { error: message });
|
|
34
|
+
error(`Failed to refresh: ${message}`);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=refreshBuiltin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refreshBuiltin.js","sourceRoot":"","sources":["../../src/commands/refreshBuiltin.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,6BAA6B,EAAE,MAAM,uBAAuB,CAAC;AACtE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,MAAM,GAAG,GAAG,YAAY,CAAC,iBAAiB,CAAC,CAAC;AAE5C;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc;IAClC,MAAM,SAAS,GAAG,kBAAkB,EAAE,CAAC;IACvC,MAAM,IAAI,GAAG,WAAW,EAAE,CAAC;IAE3B,MAAM,CAAC,2BAA2B,CAAC,CAAC;IACpC,IAAI,CAAC,aAAa,IAAI,EAAE,CAAC,CAAC;IAC1B,IAAI,CAAC,WAAW,SAAS,EAAE,CAAC,CAAC;IAE7B,IAAI,CAAC;QACH,MAAM,WAAW,GAAG,6BAA6B,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;QAEnE,GAAG,CAAC,IAAI,CAAC,6BAA6B,EAAE,EAAE,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;QAE7E,OAAO,CAAC,GAAG,EAAE,CAAC;QACd,OAAO,CAAC,GAAG,WAAW,CAAC,MAAM,mBAAmB,CAAC,CAAC;QAElD,KAAK,MAAM,QAAQ,IAAI,WAAW,EAAE,CAAC;YACnC,IAAI,CAAC,OAAO,QAAQ,EAAE,CAAC,CAAC;QAC1B,CAAC;IACH,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,OAAO,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QACjE,GAAG,CAAC,KAAK,CAAC,qCAAqC,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC;QACrE,KAAK,CAAC,sBAAsB,OAAO,EAAE,CAAC,CAAC;IACzC,CAAC;AACH,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Task execution logic
|
|
3
3
|
*/
|
|
4
|
+
import { type TaskInfo } from '../task/index.js';
|
|
4
5
|
/**
|
|
5
6
|
* Execute a single task with workflow
|
|
6
7
|
*/
|
|
@@ -12,4 +13,12 @@ export declare function executeTask(task: string, cwd: string, workflowName?: st
|
|
|
12
13
|
* 実行中にタスクファイルが追加・削除されても反映される。
|
|
13
14
|
*/
|
|
14
15
|
export declare function runAllTasks(cwd: string, workflowName?: string): Promise<void>;
|
|
16
|
+
/**
|
|
17
|
+
* Resolve execution directory and workflow from task data.
|
|
18
|
+
* If the task has worktree settings, create a worktree and use it as cwd.
|
|
19
|
+
*/
|
|
20
|
+
export declare function resolveTaskExecution(task: TaskInfo, defaultCwd: string, defaultWorkflow: string): {
|
|
21
|
+
execCwd: string;
|
|
22
|
+
execWorkflow: string;
|
|
23
|
+
};
|
|
15
24
|
//# sourceMappingURL=taskExecution.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taskExecution.d.ts","sourceRoot":"","sources":["../../src/commands/taskExecution.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"taskExecution.d.ts","sourceRoot":"","sources":["../../src/commands/taskExecution.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAc,KAAK,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAgB7D;;GAEG;AACH,wBAAsB,WAAW,CAC/B,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,EACX,YAAY,GAAE,MAA8B,GAC3C,OAAO,CAAC,OAAO,CAAC,CAiBlB;AAED;;;;;GAKG;AACH,wBAAsB,WAAW,CAC/B,GAAG,EAAE,MAAM,EACX,YAAY,GAAE,MAA8B,GAC3C,OAAO,CAAC,IAAI,CAAC,CA4Ef;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,QAAQ,EACd,UAAU,EAAE,MAAM,EAClB,eAAe,EAAE,MAAM,GACtB;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,CAyB3C"}
|