takt 0.2.3 → 0.3.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 +161 -133
- package/dist/agents/runner.d.ts +2 -4
- package/dist/agents/runner.d.ts.map +1 -1
- package/dist/agents/runner.js +6 -35
- package/dist/agents/runner.js.map +1 -1
- package/dist/claude/client.d.ts +31 -6
- package/dist/claude/client.d.ts.map +1 -1
- package/dist/claude/client.js +78 -30
- package/dist/claude/client.js.map +1 -1
- package/dist/claude/index.d.ts +1 -1
- package/dist/claude/index.d.ts.map +1 -1
- package/dist/claude/index.js +1 -1
- package/dist/claude/index.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +22 -6
- package/dist/cli.js.map +1 -1
- package/dist/codex/client.d.ts +0 -1
- package/dist/codex/client.d.ts.map +1 -1
- package/dist/codex/client.js +3 -6
- package/dist/codex/client.js.map +1 -1
- package/dist/commands/addTask.d.ts.map +1 -1
- package/dist/commands/addTask.js +17 -2
- package/dist/commands/addTask.js.map +1 -1
- package/dist/commands/eject.d.ts +13 -0
- package/dist/commands/eject.d.ts.map +1 -0
- package/dist/commands/eject.js +105 -0
- package/dist/commands/eject.js.map +1 -0
- package/dist/commands/help.d.ts.map +1 -1
- package/dist/commands/help.js +9 -2
- package/dist/commands/help.js.map +1 -1
- package/dist/commands/index.d.ts +1 -0
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +1 -0
- package/dist/commands/index.js.map +1 -1
- package/dist/commands/refreshBuiltin.d.ts +4 -4
- package/dist/commands/refreshBuiltin.d.ts.map +1 -1
- package/dist/commands/refreshBuiltin.js +13 -29
- package/dist/commands/refreshBuiltin.js.map +1 -1
- package/dist/commands/workflowExecution.d.ts.map +1 -1
- package/dist/commands/workflowExecution.js +85 -18
- package/dist/commands/workflowExecution.js.map +1 -1
- package/dist/config/agentLoader.d.ts +3 -1
- package/dist/config/agentLoader.d.ts.map +1 -1
- package/dist/config/agentLoader.js +17 -24
- package/dist/config/agentLoader.js.map +1 -1
- package/dist/config/globalConfig.d.ts +2 -0
- package/dist/config/globalConfig.d.ts.map +1 -1
- package/dist/config/globalConfig.js +14 -0
- package/dist/config/globalConfig.js.map +1 -1
- package/dist/config/initialization.d.ts +7 -5
- package/dist/config/initialization.d.ts.map +1 -1
- package/dist/config/initialization.js +23 -21
- package/dist/config/initialization.js.map +1 -1
- package/dist/config/paths.d.ts +5 -0
- package/dist/config/paths.d.ts.map +1 -1
- package/dist/config/paths.js +9 -0
- package/dist/config/paths.js.map +1 -1
- package/dist/config/workflowLoader.d.ts +6 -4
- package/dist/config/workflowLoader.d.ts.map +1 -1
- package/dist/config/workflowLoader.js +190 -35
- package/dist/config/workflowLoader.js.map +1 -1
- package/dist/github/issue.d.ts +72 -0
- package/dist/github/issue.d.ts.map +1 -0
- package/dist/github/issue.js +143 -0
- package/dist/github/issue.js.map +1 -0
- package/dist/models/index.d.ts +1 -1
- package/dist/models/index.d.ts.map +1 -1
- package/dist/models/index.js.map +1 -1
- package/dist/models/schemas.d.ts +164 -90
- package/dist/models/schemas.d.ts.map +1 -1
- package/dist/models/schemas.js +77 -51
- package/dist/models/schemas.js.map +1 -1
- package/dist/models/types.d.ts +51 -20
- package/dist/models/types.d.ts.map +1 -1
- package/dist/providers/claude.js +2 -2
- package/dist/providers/claude.js.map +1 -1
- package/dist/providers/codex.d.ts.map +1 -1
- package/dist/providers/codex.js +0 -2
- package/dist/providers/codex.js.map +1 -1
- package/dist/providers/index.d.ts +2 -1
- package/dist/providers/index.d.ts.map +1 -1
- package/dist/providers/index.js.map +1 -1
- package/dist/resources/index.d.ts +3 -22
- package/dist/resources/index.d.ts.map +1 -1
- package/dist/resources/index.js +3 -73
- package/dist/resources/index.js.map +1 -1
- package/dist/utils/session.d.ts +74 -10
- package/dist/utils/session.d.ts.map +1 -1
- package/dist/utils/session.js +101 -51
- package/dist/utils/session.js.map +1 -1
- package/dist/workflow/engine.d.ts +34 -1
- package/dist/workflow/engine.d.ts.map +1 -1
- package/dist/workflow/engine.js +228 -36
- package/dist/workflow/engine.js.map +1 -1
- package/dist/workflow/index.d.ts +1 -1
- package/dist/workflow/index.d.ts.map +1 -1
- package/dist/workflow/index.js +1 -1
- package/dist/workflow/index.js.map +1 -1
- package/dist/workflow/instruction-builder.d.ts +87 -18
- package/dist/workflow/instruction-builder.d.ts.map +1 -1
- package/dist/workflow/instruction-builder.js +404 -57
- package/dist/workflow/instruction-builder.js.map +1 -1
- package/dist/workflow/parallel-logger.d.ts +76 -0
- package/dist/workflow/parallel-logger.d.ts.map +1 -0
- package/dist/workflow/parallel-logger.js +173 -0
- package/dist/workflow/parallel-logger.js.map +1 -0
- package/dist/workflow/phase-runner.d.ts +40 -0
- package/dist/workflow/phase-runner.d.ts.map +1 -0
- package/dist/workflow/phase-runner.js +69 -0
- package/dist/workflow/phase-runner.js.map +1 -0
- package/dist/workflow/rule-evaluator.d.ts +64 -0
- package/dist/workflow/rule-evaluator.d.ts.map +1 -0
- package/dist/workflow/rule-evaluator.js +178 -0
- package/dist/workflow/rule-evaluator.js.map +1 -0
- package/dist/workflow/rule-utils.d.ts +13 -0
- package/dist/workflow/rule-utils.d.ts.map +1 -0
- package/dist/workflow/rule-utils.js +17 -0
- package/dist/workflow/rule-utils.js.map +1 -0
- package/dist/workflow/transitions.d.ts +5 -13
- package/dist/workflow/transitions.d.ts.map +1 -1
- package/dist/workflow/transitions.js +8 -78
- package/dist/workflow/transitions.js.map +1 -1
- package/dist/workflow/types.d.ts +2 -1
- package/dist/workflow/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/resources/global/en/agents/default/ai-antipattern-reviewer.md +71 -15
- package/resources/global/en/agents/default/{architect.md → architecture-reviewer.md} +144 -44
- package/resources/global/en/agents/default/coder.md +4 -4
- package/resources/global/en/agents/default/planner.md +16 -9
- package/resources/global/en/agents/default/{security.md → security-reviewer.md} +23 -5
- package/resources/global/en/agents/default/supervisor.md +13 -2
- package/resources/global/en/agents/expert/frontend-reviewer.md +0 -17
- package/resources/global/en/agents/expert/qa-reviewer.md +0 -16
- package/resources/global/en/agents/expert/security-reviewer.md +0 -16
- package/resources/global/en/agents/expert-cqrs/cqrs-es-reviewer.md +0 -17
- package/resources/global/en/agents/templates/coder.md +128 -0
- package/resources/global/en/agents/templates/planner.md +44 -0
- package/resources/global/en/agents/templates/reviewer.md +57 -0
- package/resources/global/en/agents/templates/supervisor.md +64 -0
- package/resources/global/en/workflows/default.yaml +232 -772
- package/resources/global/en/workflows/expert-cqrs.yaml +319 -698
- package/resources/global/en/workflows/expert.yaml +348 -723
- package/resources/global/en/workflows/magi.yaml +45 -52
- package/resources/global/en/workflows/research.yaml +18 -99
- package/resources/global/en/workflows/simple.yaml +152 -421
- package/resources/global/ja/agents/default/ai-antipattern-reviewer.md +71 -15
- package/resources/global/ja/agents/default/{architect.md → architecture-reviewer.md} +148 -48
- package/resources/global/ja/agents/default/coder.md +4 -4
- package/resources/global/ja/agents/default/planner.md +16 -9
- package/resources/global/ja/agents/default/{security.md → security-reviewer.md} +23 -5
- package/resources/global/ja/agents/default/supervisor.md +13 -2
- package/resources/global/ja/agents/expert/frontend-reviewer.md +0 -18
- package/resources/global/ja/agents/expert/qa-reviewer.md +0 -16
- package/resources/global/ja/agents/expert/security-reviewer.md +0 -16
- package/resources/global/ja/agents/expert-cqrs/cqrs-es-reviewer.md +0 -18
- package/resources/global/ja/agents/templates/coder.md +128 -0
- package/resources/global/ja/agents/templates/planner.md +44 -0
- package/resources/global/ja/agents/templates/reviewer.md +57 -0
- package/resources/global/ja/agents/templates/supervisor.md +64 -0
- package/resources/global/ja/workflows/default.yaml +227 -773
- package/resources/global/ja/workflows/expert-cqrs.yaml +309 -833
- package/resources/global/ja/workflows/expert.yaml +325 -712
- package/resources/global/ja/workflows/magi.yaml +45 -52
- package/resources/global/ja/workflows/research.yaml +18 -99
- package/resources/global/ja/workflows/simple.yaml +145 -415
package/dist/models/schemas.js
CHANGED
|
@@ -10,7 +10,6 @@ export const AgentTypeSchema = z.enum(['coder', 'architect', 'supervisor', 'cust
|
|
|
10
10
|
/** Status schema */
|
|
11
11
|
export const StatusSchema = z.enum([
|
|
12
12
|
'pending',
|
|
13
|
-
'in_progress',
|
|
14
13
|
'done',
|
|
15
14
|
'blocked',
|
|
16
15
|
'approved',
|
|
@@ -20,41 +19,80 @@ export const StatusSchema = z.enum([
|
|
|
20
19
|
'interrupted',
|
|
21
20
|
'answer',
|
|
22
21
|
]);
|
|
22
|
+
/** Permission mode schema for tool execution */
|
|
23
|
+
export const PermissionModeSchema = z.enum(['default', 'acceptEdits', 'bypassPermissions']);
|
|
23
24
|
/**
|
|
24
|
-
*
|
|
25
|
+
* Report object schema (new structured format).
|
|
25
26
|
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* -
|
|
29
|
-
*
|
|
30
|
-
* -
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
27
|
+
* YAML format:
|
|
28
|
+
* report:
|
|
29
|
+
* name: 00-plan.md
|
|
30
|
+
* order: |
|
|
31
|
+
* **レポート出力:** {report:00-plan.md} に出力してください。
|
|
32
|
+
* format: |
|
|
33
|
+
* **レポートフォーマット:**
|
|
34
|
+
* ```markdown
|
|
35
|
+
* ...
|
|
36
|
+
* ```
|
|
35
37
|
*/
|
|
36
|
-
export const
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
38
|
+
export const ReportObjectSchema = z.object({
|
|
39
|
+
/** Report file name */
|
|
40
|
+
name: z.string().min(1),
|
|
41
|
+
/** Instruction prepended before instruction_template (e.g., output destination) */
|
|
42
|
+
order: z.string().optional(),
|
|
43
|
+
/** Instruction appended after instruction_template (e.g., output format) */
|
|
44
|
+
format: z.string().optional(),
|
|
45
|
+
});
|
|
46
|
+
/**
|
|
47
|
+
* Report field schema.
|
|
48
|
+
*
|
|
49
|
+
* YAML formats:
|
|
50
|
+
* report: 00-plan.md # single file (string)
|
|
51
|
+
* report: # multiple files (label: path map entries)
|
|
52
|
+
* - Scope: 01-scope.md
|
|
53
|
+
* - Decisions: 02-decisions.md
|
|
54
|
+
* report: # object form (name + order + format)
|
|
55
|
+
* name: 00-plan.md
|
|
56
|
+
* order: ...
|
|
57
|
+
* format: ...
|
|
58
|
+
*
|
|
59
|
+
* Array items are parsed as single-key objects: [{Scope: "01-scope.md"}, ...]
|
|
60
|
+
*/
|
|
61
|
+
export const ReportFieldSchema = z.union([
|
|
62
|
+
z.string().min(1),
|
|
63
|
+
z.array(z.record(z.string(), z.string())).min(1),
|
|
64
|
+
ReportObjectSchema,
|
|
44
65
|
]);
|
|
45
|
-
/**
|
|
46
|
-
export const
|
|
47
|
-
/**
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
66
|
+
/** Rule-based transition schema (new unified format) */
|
|
67
|
+
export const WorkflowRuleSchema = z.object({
|
|
68
|
+
/** Human-readable condition text */
|
|
69
|
+
condition: z.string().min(1),
|
|
70
|
+
/** Next step name (e.g., implement, COMPLETE, ABORT). Optional for parallel sub-steps (parent handles routing). */
|
|
71
|
+
next: z.string().min(1).optional(),
|
|
72
|
+
/** Template for additional AI output */
|
|
73
|
+
appendix: z.string().optional(),
|
|
74
|
+
});
|
|
75
|
+
/** Sub-step schema for parallel execution (agent is required) */
|
|
76
|
+
export const ParallelSubStepRawSchema = z.object({
|
|
77
|
+
name: z.string().min(1),
|
|
78
|
+
agent: z.string().min(1),
|
|
79
|
+
agent_name: z.string().optional(),
|
|
80
|
+
allowed_tools: z.array(z.string()).optional(),
|
|
81
|
+
provider: z.enum(['claude', 'codex', 'mock']).optional(),
|
|
82
|
+
model: z.string().optional(),
|
|
83
|
+
permission_mode: PermissionModeSchema.optional(),
|
|
84
|
+
edit: z.boolean().optional(),
|
|
85
|
+
instruction: z.string().optional(),
|
|
86
|
+
instruction_template: z.string().optional(),
|
|
87
|
+
rules: z.array(WorkflowRuleSchema).optional(),
|
|
88
|
+
report: ReportFieldSchema.optional(),
|
|
89
|
+
pass_previous_response: z.boolean().optional().default(true),
|
|
51
90
|
});
|
|
52
|
-
/** Permission mode schema for tool execution */
|
|
53
|
-
export const PermissionModeSchema = z.enum(['default', 'acceptEdits', 'bypassPermissions']);
|
|
54
91
|
/** Workflow step schema - raw YAML format */
|
|
55
92
|
export const WorkflowStepRawSchema = z.object({
|
|
56
93
|
name: z.string().min(1),
|
|
57
|
-
|
|
94
|
+
/** Agent is required for normal steps, optional for parallel container steps */
|
|
95
|
+
agent: z.string().optional(),
|
|
58
96
|
/** Display name for the agent (shown in output). Falls back to agent basename if not specified */
|
|
59
97
|
agent_name: z.string().optional(),
|
|
60
98
|
allowed_tools: z.array(z.string()).optional(),
|
|
@@ -62,16 +100,18 @@ export const WorkflowStepRawSchema = z.object({
|
|
|
62
100
|
model: z.string().optional(),
|
|
63
101
|
/** Permission mode for tool execution in this step */
|
|
64
102
|
permission_mode: PermissionModeSchema.optional(),
|
|
103
|
+
/** Whether this step is allowed to edit project files */
|
|
104
|
+
edit: z.boolean().optional(),
|
|
65
105
|
instruction: z.string().optional(),
|
|
66
106
|
instruction_template: z.string().optional(),
|
|
67
|
-
|
|
107
|
+
/** Rules for step routing */
|
|
108
|
+
rules: z.array(WorkflowRuleSchema).optional(),
|
|
109
|
+
/** Report file(s) for this step */
|
|
110
|
+
report: ReportFieldSchema.optional(),
|
|
68
111
|
pass_previous_response: z.boolean().optional().default(true),
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
next_step: z.string().min(1),
|
|
73
|
-
})).optional().default([]),
|
|
74
|
-
});
|
|
112
|
+
/** Sub-steps to execute in parallel */
|
|
113
|
+
parallel: z.array(ParallelSubStepRawSchema).optional(),
|
|
114
|
+
}).refine((data) => data.agent || (data.parallel && data.parallel.length > 0), { message: 'Step must have either an agent or parallel sub-steps' });
|
|
75
115
|
/** Workflow configuration schema - raw YAML format */
|
|
76
116
|
export const WorkflowConfigRawSchema = z.object({
|
|
77
117
|
name: z.string().min(1),
|
|
@@ -87,7 +127,6 @@ export const CustomAgentConfigSchema = z.object({
|
|
|
87
127
|
prompt_file: z.string().optional(),
|
|
88
128
|
prompt: z.string().optional(),
|
|
89
129
|
allowed_tools: z.array(z.string()).optional(),
|
|
90
|
-
status_patterns: z.record(z.string(), z.string()).optional(),
|
|
91
130
|
claude_agent: z.string().optional(),
|
|
92
131
|
claude_skill: z.string().optional(),
|
|
93
132
|
provider: z.enum(['claude', 'codex', 'mock']).optional(),
|
|
@@ -111,6 +150,8 @@ export const GlobalConfigSchema = z.object({
|
|
|
111
150
|
debug: DebugConfigSchema.optional(),
|
|
112
151
|
/** Directory for shared clones (worktree_dir in config). If empty, uses ../{clone-name} relative to project */
|
|
113
152
|
worktree_dir: z.string().optional(),
|
|
153
|
+
/** List of builtin workflow/agent names to exclude from fallback loading */
|
|
154
|
+
disabled_builtins: z.array(z.string()).optional().default([]),
|
|
114
155
|
});
|
|
115
156
|
/** Project config schema */
|
|
116
157
|
export const ProjectConfigSchema = z.object({
|
|
@@ -118,19 +159,4 @@ export const ProjectConfigSchema = z.object({
|
|
|
118
159
|
agents: z.array(CustomAgentConfigSchema).optional(),
|
|
119
160
|
provider: z.enum(['claude', 'codex', 'mock']).optional(),
|
|
120
161
|
});
|
|
121
|
-
/**
|
|
122
|
-
* Generic status patterns that match any role name
|
|
123
|
-
* Format: [ROLE:COMMAND] where ROLE is any word characters
|
|
124
|
-
*
|
|
125
|
-
* This allows new agents to be added without modifying this file.
|
|
126
|
-
* Custom agents can override these patterns in their configuration.
|
|
127
|
-
*/
|
|
128
|
-
export const GENERIC_STATUS_PATTERNS = {
|
|
129
|
-
approved: '\\[[\\w-]+:APPROVE\\]',
|
|
130
|
-
rejected: '\\[[\\w-]+:REJECT\\]',
|
|
131
|
-
improve: '\\[[\\w-]+:IMPROVE\\]',
|
|
132
|
-
done: '\\[[\\w-]+:(DONE|FIXED)\\]',
|
|
133
|
-
blocked: '\\[[\\w-]+:BLOCKED\\]',
|
|
134
|
-
answer: '\\[[\\w-]+:ANSWER\\]',
|
|
135
|
-
};
|
|
136
162
|
//# sourceMappingURL=schemas.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../src/models/schemas.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAC3B,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnD,wBAAwB;AACxB,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,CAAC,CAAC,CAAC;AAEtF,oBAAoB;AACpB,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC,IAAI,CAAC;IACjC,SAAS;IACT,
|
|
1
|
+
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../src/models/schemas.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAC3B,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnD,wBAAwB;AACxB,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,CAAC,CAAC,CAAC;AAEtF,oBAAoB;AACpB,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC,IAAI,CAAC;IACjC,SAAS;IACT,MAAM;IACN,SAAS;IACT,UAAU;IACV,UAAU;IACV,SAAS;IACT,WAAW;IACX,aAAa;IACb,QAAQ;CACT,CAAC,CAAC;AAEH,gDAAgD;AAChD,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,aAAa,EAAE,mBAAm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iBAAiB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;CAC9D,CAAC,CAAC;AAEH,4BAA4B;AAC5B,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC,QAAQ,EAAE;IACnD,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,QAAQ,EAAE;CACzD,CAAC,CAAC"}
|
package/dist/models/types.d.ts
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
/** Built-in agent types */
|
|
5
5
|
export type AgentType = 'coder' | 'architect' | 'supervisor' | 'custom';
|
|
6
6
|
/** Execution status for agents and workflows */
|
|
7
|
-
export type Status = 'pending' | '
|
|
8
|
-
/**
|
|
9
|
-
export type
|
|
7
|
+
export type Status = 'pending' | 'done' | 'blocked' | 'approved' | 'rejected' | 'improve' | 'cancelled' | 'interrupted' | 'answer';
|
|
8
|
+
/** How a rule match was detected */
|
|
9
|
+
export type RuleMatchMethod = 'aggregate' | 'phase3_tag' | 'phase1_tag' | 'ai_judge' | 'ai_judge_fallback';
|
|
10
10
|
/** Response from an agent execution */
|
|
11
11
|
export interface AgentResponse {
|
|
12
12
|
agent: string;
|
|
@@ -16,6 +16,10 @@ export interface AgentResponse {
|
|
|
16
16
|
sessionId?: string;
|
|
17
17
|
/** Error message when the query failed (e.g., API error, rate limit) */
|
|
18
18
|
error?: string;
|
|
19
|
+
/** Matched rule index (0-based) when rules-based detection was used */
|
|
20
|
+
matchedRuleIndex?: number;
|
|
21
|
+
/** How the rule match was detected */
|
|
22
|
+
matchedRuleMethod?: RuleMatchMethod;
|
|
19
23
|
}
|
|
20
24
|
/** Session state for workflow execution */
|
|
21
25
|
export interface SessionState {
|
|
@@ -25,13 +29,41 @@ export interface SessionState {
|
|
|
25
29
|
history: AgentResponse[];
|
|
26
30
|
context: Record<string, string>;
|
|
27
31
|
}
|
|
28
|
-
/**
|
|
29
|
-
export interface
|
|
30
|
-
condition
|
|
31
|
-
|
|
32
|
+
/** Rule-based transition configuration (new unified format) */
|
|
33
|
+
export interface WorkflowRule {
|
|
34
|
+
/** Human-readable condition text */
|
|
35
|
+
condition: string;
|
|
36
|
+
/** Next step name (e.g., implement, COMPLETE, ABORT). Optional for parallel sub-steps. */
|
|
37
|
+
next?: string;
|
|
38
|
+
/** Template for additional AI output */
|
|
39
|
+
appendix?: string;
|
|
40
|
+
/** Whether this condition uses ai() expression (set by loader) */
|
|
41
|
+
isAiCondition?: boolean;
|
|
42
|
+
/** The condition text inside ai("...") for AI judge evaluation (set by loader) */
|
|
43
|
+
aiConditionText?: string;
|
|
44
|
+
/** Whether this condition uses all()/any() aggregate expression (set by loader) */
|
|
45
|
+
isAggregateCondition?: boolean;
|
|
46
|
+
/** Aggregate type: 'all' requires all sub-steps match, 'any' requires at least one (set by loader) */
|
|
47
|
+
aggregateType?: 'all' | 'any';
|
|
48
|
+
/** The condition text inside all("...")/any("...") to match against sub-step results (set by loader) */
|
|
49
|
+
aggregateConditionText?: string;
|
|
50
|
+
}
|
|
51
|
+
/** Report file configuration for a workflow step (label: path pair) */
|
|
52
|
+
export interface ReportConfig {
|
|
53
|
+
/** Display label (e.g., "Scope", "Decisions") */
|
|
54
|
+
label: string;
|
|
55
|
+
/** File path relative to report directory (e.g., "01-coder-scope.md") */
|
|
56
|
+
path: string;
|
|
57
|
+
}
|
|
58
|
+
/** Report object configuration with order/format instructions */
|
|
59
|
+
export interface ReportObjectConfig {
|
|
60
|
+
/** Report file name (e.g., "00-plan.md") */
|
|
61
|
+
name: string;
|
|
62
|
+
/** Instruction prepended before instruction_template (e.g., output destination) */
|
|
63
|
+
order?: string;
|
|
64
|
+
/** Instruction appended after instruction_template (e.g., output format) */
|
|
65
|
+
format?: string;
|
|
32
66
|
}
|
|
33
|
-
/** Behavior when no status marker is found in agent output */
|
|
34
|
-
export type OnNoStatusBehavior = 'complete' | 'continue' | 'stay';
|
|
35
67
|
/** Permission mode for tool execution */
|
|
36
68
|
export type PermissionMode = 'default' | 'acceptEdits' | 'bypassPermissions';
|
|
37
69
|
/** Single step in a workflow */
|
|
@@ -51,18 +83,16 @@ export interface WorkflowStep {
|
|
|
51
83
|
model?: string;
|
|
52
84
|
/** Permission mode for tool execution in this step */
|
|
53
85
|
permissionMode?: PermissionMode;
|
|
86
|
+
/** Whether this step is allowed to edit project files (true=allowed, false=prohibited, undefined=no prompt) */
|
|
87
|
+
edit?: boolean;
|
|
54
88
|
instructionTemplate: string;
|
|
55
|
-
/**
|
|
56
|
-
|
|
57
|
-
|
|
89
|
+
/** Rules for step routing */
|
|
90
|
+
rules?: WorkflowRule[];
|
|
91
|
+
/** Report file configuration. Single string, array of label:path, or object with order/format. */
|
|
92
|
+
report?: string | ReportConfig[] | ReportObjectConfig;
|
|
58
93
|
passPreviousResponse: boolean;
|
|
59
|
-
/**
|
|
60
|
-
|
|
61
|
-
* - 'complete': Treat as done, follow done/always transition or complete workflow (default)
|
|
62
|
-
* - 'continue': Treat as done, follow done/always transition or move to next step
|
|
63
|
-
* - 'stay': Stay on current step (may cause loops, use with caution)
|
|
64
|
-
*/
|
|
65
|
-
onNoStatus?: OnNoStatusBehavior;
|
|
94
|
+
/** Sub-steps to execute in parallel. When set, this step runs all sub-steps concurrently. */
|
|
95
|
+
parallel?: WorkflowStep[];
|
|
66
96
|
}
|
|
67
97
|
/** Loop detection configuration */
|
|
68
98
|
export interface LoopDetectionConfig {
|
|
@@ -105,7 +135,6 @@ export interface CustomAgentConfig {
|
|
|
105
135
|
promptFile?: string;
|
|
106
136
|
prompt?: string;
|
|
107
137
|
allowedTools?: string[];
|
|
108
|
-
statusPatterns?: Record<string, string>;
|
|
109
138
|
claudeAgent?: string;
|
|
110
139
|
claudeSkill?: string;
|
|
111
140
|
provider?: 'claude' | 'codex' | 'mock';
|
|
@@ -129,6 +158,8 @@ export interface GlobalConfig {
|
|
|
129
158
|
debug?: DebugConfig;
|
|
130
159
|
/** Directory for shared clones (worktree_dir in config). If empty, uses ../{clone-name} relative to project */
|
|
131
160
|
worktreeDir?: string;
|
|
161
|
+
/** List of builtin workflow/agent names to exclude from fallback loading */
|
|
162
|
+
disabledBuiltins?: string[];
|
|
132
163
|
}
|
|
133
164
|
/** Project-level configuration */
|
|
134
165
|
export interface ProjectConfig {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/models/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,2BAA2B;AAC3B,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,WAAW,GAAG,YAAY,GAAG,QAAQ,CAAC;AAExE,gDAAgD;AAChD,MAAM,MAAM,MAAM,GACd,SAAS,GACT,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/models/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,2BAA2B;AAC3B,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,WAAW,GAAG,YAAY,GAAG,QAAQ,CAAC;AAExE,gDAAgD;AAChD,MAAM,MAAM,MAAM,GACd,SAAS,GACT,MAAM,GACN,SAAS,GACT,UAAU,GACV,UAAU,GACV,SAAS,GACT,WAAW,GACX,aAAa,GACb,QAAQ,CAAC;AAEb,oCAAoC;AACpC,MAAM,MAAM,eAAe,GACvB,WAAW,GACX,YAAY,GACZ,YAAY,GACZ,UAAU,GACV,mBAAmB,CAAC;AAExB,uCAAuC;AACvC,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,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,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;IAC9C,QAAQ,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;IACvC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,+GAA+G;IAC/G,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4EAA4E;IAC5E,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC7B;AAED,kCAAkC;AAClC,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAC7B,QAAQ,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;CACxC"}
|
package/dist/providers/claude.js
CHANGED
|
@@ -10,8 +10,8 @@ export class ClaudeProvider {
|
|
|
10
10
|
sessionId: options.sessionId,
|
|
11
11
|
allowedTools: options.allowedTools,
|
|
12
12
|
model: options.model,
|
|
13
|
+
maxTurns: options.maxTurns,
|
|
13
14
|
systemPrompt: options.systemPrompt,
|
|
14
|
-
statusPatterns: options.statusPatterns,
|
|
15
15
|
permissionMode: options.permissionMode,
|
|
16
16
|
onStream: options.onStream,
|
|
17
17
|
onPermissionRequest: options.onPermissionRequest,
|
|
@@ -26,7 +26,7 @@ export class ClaudeProvider {
|
|
|
26
26
|
sessionId: options.sessionId,
|
|
27
27
|
allowedTools: options.allowedTools,
|
|
28
28
|
model: options.model,
|
|
29
|
-
|
|
29
|
+
maxTurns: options.maxTurns,
|
|
30
30
|
permissionMode: options.permissionMode,
|
|
31
31
|
onStream: options.onStream,
|
|
32
32
|
onPermissionRequest: options.onPermissionRequest,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude.js","sourceRoot":"","sources":["../../src/providers/claude.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAA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AG;YAChB,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,YAAY,EAAE,OAAO,CAAC,YAAY;YAClC,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,QAAQ,EAAE,OAAO,CAAC,QAAQ;YAC1B,cAAc,EAAE,OAAO,CAAC,cAAc;YACtC,QAAQ,EAAE,OAAO,CAAC,QAAQ;YAC1B,mBAAmB,EAAE,OAAO,CAAC,mBAAmB;YAChD,iBAAiB,EAAE,OAAO,CAAC,iBAAiB;YAC5C,iBAAiB,EAAE,OAAO,CAAC,iBAAiB;SAC7C,CAAC;QAEF,OAAO,gBAAgB,CAAC,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,WAAW,CAAC,CAAC;IACxE,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codex.d.ts","sourceRoot":"","sources":["../../src/providers/codex.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEhE,mDAAmD;AACnD,qBAAa,aAAc,YAAW,QAAQ;IACtC,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"codex.d.ts","sourceRoot":"","sources":["../../src/providers/codex.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEhE,mDAAmD;AACnD,qBAAa,aAAc,YAAW,QAAQ;IACtC,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,aAAa,CAAC;IAY7F,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,aAAa,CAAC;CAUhI"}
|
package/dist/providers/codex.js
CHANGED
|
@@ -10,7 +10,6 @@ export class CodexProvider {
|
|
|
10
10
|
sessionId: options.sessionId,
|
|
11
11
|
model: options.model,
|
|
12
12
|
systemPrompt: options.systemPrompt,
|
|
13
|
-
statusPatterns: options.statusPatterns,
|
|
14
13
|
onStream: options.onStream,
|
|
15
14
|
};
|
|
16
15
|
return callCodex(agentName, prompt, callOptions);
|
|
@@ -20,7 +19,6 @@ export class CodexProvider {
|
|
|
20
19
|
cwd: options.cwd,
|
|
21
20
|
sessionId: options.sessionId,
|
|
22
21
|
model: options.model,
|
|
23
|
-
statusPatterns: options.statusPatterns,
|
|
24
22
|
onStream: options.onStream,
|
|
25
23
|
};
|
|
26
24
|
return callCodexCustom(agentName, prompt, systemPrompt, callOptions);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codex.js","sourceRoot":"","sources":["../../src/providers/codex.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,eAAe,EAAyB,MAAM,oBAAoB,CAAC;AAIvF,mDAAmD;AACnD,MAAM,OAAO,aAAa;IACxB,KAAK,CAAC,IAAI,CAAC,SAAiB,EAAE,MAAc,EAAE,OAA4B;QACxE,MAAM,WAAW,GAAqB;YACpC,GAAG,EAAE,OAAO,CAAC,GAAG;YAChB,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,YAAY,EAAE,OAAO,CAAC,YAAY;YAClC,
|
|
1
|
+
{"version":3,"file":"codex.js","sourceRoot":"","sources":["../../src/providers/codex.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,eAAe,EAAyB,MAAM,oBAAoB,CAAC;AAIvF,mDAAmD;AACnD,MAAM,OAAO,aAAa;IACxB,KAAK,CAAC,IAAI,CAAC,SAAiB,EAAE,MAAc,EAAE,OAA4B;QACxE,MAAM,WAAW,GAAqB;YACpC,GAAG,EAAE,OAAO,CAAC,GAAG;YAChB,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,YAAY,EAAE,OAAO,CAAC,YAAY;YAClC,QAAQ,EAAE,OAAO,CAAC,QAAQ;SAC3B,CAAC;QAEF,OAAO,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC;IACnD,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,SAAiB,EAAE,MAAc,EAAE,YAAoB,EAAE,OAA4B;QACpG,MAAM,WAAW,GAAqB;YACpC,GAAG,EAAE,OAAO,CAAC,GAAG;YAChB,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,QAAQ,EAAE,OAAO,CAAC,QAAQ;SAC3B,CAAC;QAEF,OAAO,eAAe,CAAC,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,WAAW,CAAC,CAAC;IACvE,CAAC;CACF"}
|
|
@@ -13,7 +13,8 @@ export interface ProviderCallOptions {
|
|
|
13
13
|
model?: string;
|
|
14
14
|
systemPrompt?: string;
|
|
15
15
|
allowedTools?: string[];
|
|
16
|
-
|
|
16
|
+
/** Maximum number of agentic turns */
|
|
17
|
+
maxTurns?: number;
|
|
17
18
|
/** Permission mode for tool execution (from workflow step) */
|
|
18
19
|
permissionMode?: PermissionMode;
|
|
19
20
|
onStream?: StreamCallback;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/providers/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EA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C,aAAa,CAAC,CAAC;IAE9F,oDAAoD;IACpD,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;CAC3H;AAED,oBAAoB;AACpB,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;AASvD;;GAEG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,YAAY,GAAG,QAAQ,CAMxD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAEvE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/providers/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/providers/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AA+BzC,wBAAwB;AACxB,MAAM,SAAS,GAAmC;IAChD,MAAM,EAAE,IAAI,cAAc,EAAE;IAC5B,KAAK,EAAE,IAAI,aAAa,EAAE;IAC1B,IAAI,EAAE,IAAI,YAAY,EAAE;CACzB,CAAC;AAEF;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,IAAkB;IAC5C,MAAM,QAAQ,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;IACjC,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,0BAA0B,IAAI,EAAE,CAAC,CAAC;IACpD,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAY,EAAE,QAAkB;IAC9D,SAAsC,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC;AAC3D,CAAC"}
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Contains default workflow definitions and resource paths.
|
|
5
5
|
* Resources are organized into:
|
|
6
|
-
* - resources/global/ -
|
|
7
|
-
* - resources/global/
|
|
8
|
-
* - resources/
|
|
6
|
+
* - resources/global/{lang}/workflows/ - Builtin workflows (loaded via fallback)
|
|
7
|
+
* - resources/global/{lang}/agents/ - Builtin agents (loaded via fallback)
|
|
8
|
+
* - resources/project/ - Project-level template files (.gitignore)
|
|
9
9
|
*/
|
|
10
10
|
import type { Language } from '../models/types.js';
|
|
11
11
|
/**
|
|
@@ -25,28 +25,9 @@ export declare function getProjectResourcesDir(): string;
|
|
|
25
25
|
* Get the language-specific global resources directory path (resources/global/{lang}/)
|
|
26
26
|
*/
|
|
27
27
|
export declare function getLanguageResourcesDir(lang: Language): string;
|
|
28
|
-
/**
|
|
29
|
-
* Copy global resources directory to ~/.takt.
|
|
30
|
-
* Only copies files that don't exist in target.
|
|
31
|
-
* Skips language-specific directories (en/, ja/) which are handled by copyLanguageResourcesToDir.
|
|
32
|
-
*/
|
|
33
|
-
export declare function copyGlobalResourcesToDir(targetDir: string): void;
|
|
34
28
|
/**
|
|
35
29
|
* Copy project resources directory to .takt in project.
|
|
36
30
|
* Only copies files that don't exist in target (e.g., .gitignore).
|
|
37
31
|
*/
|
|
38
32
|
export declare function copyProjectResourcesToDir(targetDir: string): void;
|
|
39
|
-
/**
|
|
40
|
-
* Copy language-specific resources (agents and workflows) to ~/.takt.
|
|
41
|
-
* Copies from resources/global/{lang}/agents to ~/.takt/agents
|
|
42
|
-
* and resources/global/{lang}/workflows to ~/.takt/workflows.
|
|
43
|
-
* Also copies config.yaml from language directory.
|
|
44
|
-
* @throws Error if language directory doesn't exist
|
|
45
|
-
*/
|
|
46
|
-
export declare function copyLanguageResourcesToDir(targetDir: string, lang: Language): void;
|
|
47
|
-
/**
|
|
48
|
-
* Force-refresh language-specific resources (agents and workflows) to ~/.takt.
|
|
49
|
-
* Overwrites existing builtin files. Does NOT touch config.yaml.
|
|
50
|
-
*/
|
|
51
|
-
export declare function forceRefreshLanguageResources(targetDir: string, lang: Language): string[];
|
|
52
33
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;;GAGG;AACH,wBAAgB,eAAe,IAAI,MAAM,CAIxC;AAED;;GAEG;AACH,wBAAgB,qBAAqB,IAAI,MAAM,CAE9C;AAED;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,CAE/C;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,CAE9D;AAED
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;;GAGG;AACH,wBAAgB,eAAe,IAAI,MAAM,CAIxC;AAED;;GAEG;AACH,wBAAgB,qBAAqB,IAAI,MAAM,CAE9C;AAED;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,CAE/C;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,CAE9D;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAQjE"}
|
package/dist/resources/index.js
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Contains default workflow definitions and resource paths.
|
|
5
5
|
* Resources are organized into:
|
|
6
|
-
* - resources/global/ -
|
|
7
|
-
* - resources/global/
|
|
8
|
-
* - resources/
|
|
6
|
+
* - resources/global/{lang}/workflows/ - Builtin workflows (loaded via fallback)
|
|
7
|
+
* - resources/global/{lang}/agents/ - Builtin agents (loaded via fallback)
|
|
8
|
+
* - resources/project/ - Project-level template files (.gitignore)
|
|
9
9
|
*/
|
|
10
10
|
import { readFileSync, readdirSync, existsSync, statSync, mkdirSync, writeFileSync } from 'fs';
|
|
11
11
|
import { join, dirname } from 'path';
|
|
@@ -37,19 +37,6 @@ export function getProjectResourcesDir() {
|
|
|
37
37
|
export function getLanguageResourcesDir(lang) {
|
|
38
38
|
return join(getGlobalResourcesDir(), lang);
|
|
39
39
|
}
|
|
40
|
-
/**
|
|
41
|
-
* Copy global resources directory to ~/.takt.
|
|
42
|
-
* Only copies files that don't exist in target.
|
|
43
|
-
* Skips language-specific directories (en/, ja/) which are handled by copyLanguageResourcesToDir.
|
|
44
|
-
*/
|
|
45
|
-
export function copyGlobalResourcesToDir(targetDir) {
|
|
46
|
-
const resourcesDir = getGlobalResourcesDir();
|
|
47
|
-
if (!existsSync(resourcesDir)) {
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
// Skip language directories (they are handled by copyLanguageResourcesToDir)
|
|
51
|
-
copyDirRecursive(resourcesDir, targetDir, { skipDirs: ['en', 'ja'] });
|
|
52
|
-
}
|
|
53
40
|
/**
|
|
54
41
|
* Copy project resources directory to .takt in project.
|
|
55
42
|
* Only copies files that don't exist in target (e.g., .gitignore).
|
|
@@ -63,63 +50,6 @@ export function copyProjectResourcesToDir(targetDir) {
|
|
|
63
50
|
renameMap: { dotgitignore: '.gitignore' },
|
|
64
51
|
});
|
|
65
52
|
}
|
|
66
|
-
/**
|
|
67
|
-
* Copy language-specific resources (agents and workflows) to ~/.takt.
|
|
68
|
-
* Copies from resources/global/{lang}/agents to ~/.takt/agents
|
|
69
|
-
* and resources/global/{lang}/workflows to ~/.takt/workflows.
|
|
70
|
-
* Also copies config.yaml from language directory.
|
|
71
|
-
* @throws Error if language directory doesn't exist
|
|
72
|
-
*/
|
|
73
|
-
export function copyLanguageResourcesToDir(targetDir, lang) {
|
|
74
|
-
const langDir = getLanguageResourcesDir(lang);
|
|
75
|
-
if (!existsSync(langDir)) {
|
|
76
|
-
throw new Error(`Language resources not found: ${langDir}`);
|
|
77
|
-
}
|
|
78
|
-
// Copy agents directory
|
|
79
|
-
const langAgentsDir = join(langDir, 'agents');
|
|
80
|
-
const targetAgentsDir = join(targetDir, 'agents');
|
|
81
|
-
if (existsSync(langAgentsDir)) {
|
|
82
|
-
copyDirRecursive(langAgentsDir, targetAgentsDir);
|
|
83
|
-
}
|
|
84
|
-
// Copy workflows directory
|
|
85
|
-
const langWorkflowsDir = join(langDir, 'workflows');
|
|
86
|
-
const targetWorkflowsDir = join(targetDir, 'workflows');
|
|
87
|
-
if (existsSync(langWorkflowsDir)) {
|
|
88
|
-
copyDirRecursive(langWorkflowsDir, targetWorkflowsDir);
|
|
89
|
-
}
|
|
90
|
-
// Copy config.yaml if exists
|
|
91
|
-
const langConfigPath = join(langDir, 'config.yaml');
|
|
92
|
-
const targetConfigPath = join(targetDir, 'config.yaml');
|
|
93
|
-
if (existsSync(langConfigPath) && !existsSync(targetConfigPath)) {
|
|
94
|
-
const content = readFileSync(langConfigPath);
|
|
95
|
-
writeFileSync(targetConfigPath, content);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* Force-refresh language-specific resources (agents and workflows) to ~/.takt.
|
|
100
|
-
* Overwrites existing builtin files. Does NOT touch config.yaml.
|
|
101
|
-
*/
|
|
102
|
-
export function forceRefreshLanguageResources(targetDir, lang) {
|
|
103
|
-
const langDir = getLanguageResourcesDir(lang);
|
|
104
|
-
if (!existsSync(langDir)) {
|
|
105
|
-
throw new Error(`Language resources not found: ${langDir}`);
|
|
106
|
-
}
|
|
107
|
-
const copiedFiles = [];
|
|
108
|
-
const forceOptions = { overwrite: true, copiedFiles };
|
|
109
|
-
// Overwrite agents directory
|
|
110
|
-
const langAgentsDir = join(langDir, 'agents');
|
|
111
|
-
const targetAgentsDir = join(targetDir, 'agents');
|
|
112
|
-
if (existsSync(langAgentsDir)) {
|
|
113
|
-
copyDirRecursive(langAgentsDir, targetAgentsDir, forceOptions);
|
|
114
|
-
}
|
|
115
|
-
// Overwrite workflows directory
|
|
116
|
-
const langWorkflowsDir = join(langDir, 'workflows');
|
|
117
|
-
const targetWorkflowsDir = join(targetDir, 'workflows');
|
|
118
|
-
if (existsSync(langWorkflowsDir)) {
|
|
119
|
-
copyDirRecursive(langWorkflowsDir, targetWorkflowsDir, forceOptions);
|
|
120
|
-
}
|
|
121
|
-
return copiedFiles;
|
|
122
|
-
}
|
|
123
53
|
/** Files to skip during resource copy (OS-generated files) */
|
|
124
54
|
const SKIP_FILES = ['.DS_Store', 'Thumbs.db'];
|
|
125
55
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AAC/F,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AAGpC;;;GAGG;AACH,MAAM,UAAU,eAAe;IAC7B,MAAM,UAAU,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;I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