takomi 2.1.2 → 2.1.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.
- package/.pi/README.md +124 -124
- package/.pi/agents/architect.md +15 -15
- package/.pi/agents/coder.md +14 -14
- package/.pi/agents/designer.md +17 -17
- package/.pi/agents/orchestrator.md +22 -22
- package/.pi/agents/reviewer.md +16 -16
- package/.pi/extensions/oauth-router/README.md +125 -125
- package/.pi/extensions/oauth-router/commands.ts +380 -380
- package/.pi/extensions/oauth-router/config.ts +200 -200
- package/.pi/extensions/oauth-router/index.ts +41 -41
- package/.pi/extensions/oauth-router/oauth-flow.ts +154 -154
- package/.pi/extensions/oauth-router/oauth-store.ts +121 -121
- package/.pi/extensions/oauth-router/package.json +14 -14
- package/.pi/extensions/oauth-router/policies.ts +27 -27
- package/.pi/extensions/oauth-router/provider.ts +492 -492
- package/.pi/extensions/oauth-router/scripts/vibe-verify.py +98 -98
- package/.pi/extensions/oauth-router/state.ts +174 -174
- package/.pi/extensions/oauth-router/types.ts +153 -153
- package/.pi/extensions/takomi-runtime/command-text.ts +130 -130
- package/.pi/extensions/takomi-runtime/commands.ts +179 -179
- package/.pi/extensions/takomi-runtime/context-panel.ts +282 -282
- package/.pi/extensions/takomi-runtime/index.ts +1288 -1288
- package/.pi/extensions/takomi-runtime/profile.ts +114 -114
- package/.pi/extensions/takomi-runtime/routing-policy.ts +105 -105
- package/.pi/extensions/takomi-runtime/shared.ts +511 -492
- package/.pi/extensions/takomi-runtime/subagent-controller.ts +364 -364
- package/.pi/extensions/takomi-runtime/subagent-render.ts +501 -501
- package/.pi/extensions/takomi-runtime/subagent-types.ts +90 -83
- package/.pi/extensions/takomi-runtime/ui.ts +133 -133
- package/.pi/extensions/takomi-subagents/agent-aliases.ts +18 -18
- package/.pi/extensions/takomi-subagents/agents.ts +113 -113
- package/.pi/extensions/takomi-subagents/delegation-plan.ts +95 -95
- package/.pi/extensions/takomi-subagents/dispatch-helpers.ts +26 -26
- package/.pi/extensions/takomi-subagents/dispatch.ts +306 -215
- package/.pi/extensions/takomi-subagents/index.ts +76 -75
- package/.pi/extensions/takomi-subagents/live-updates.ts +136 -83
- package/.pi/extensions/takomi-subagents/native-render.ts +5 -142
- package/.pi/extensions/takomi-subagents/pi-subagents-engine.ts +228 -0
- package/.pi/extensions/takomi-subagents/tool-runner.ts +209 -209
- package/.pi/themes/takomi-noir.json +81 -81
- package/package.json +59 -59
- package/src/cli.js +14 -0
- package/src/doctor.js +87 -84
- package/src/pi-harness.js +355 -351
- package/src/pi-installer.js +193 -171
- package/src/pi-takomi-core/index.ts +4 -4
- package/src/pi-takomi-core/orchestration.ts +402 -402
- package/src/pi-takomi-core/routing.ts +93 -93
- package/src/pi-takomi-core/types.ts +173 -173
- package/src/pi-takomi-core/workflows.ts +299 -299
- package/src/skills-installer.js +101 -101
- package/src/update-check.js +140 -0
|
@@ -1,93 +1,93 @@
|
|
|
1
|
-
import { getWorkflowDefinition } from "./workflows";
|
|
2
|
-
import type { RouteDecision, TakomiRole, TakomiWorkflowId, VibeLifecycleStage } from "./types";
|
|
3
|
-
|
|
4
|
-
function stageToWorkflow(stage: VibeLifecycleStage): TakomiWorkflowId {
|
|
5
|
-
switch (stage) {
|
|
6
|
-
case "genesis":
|
|
7
|
-
return "vibe-genesis";
|
|
8
|
-
case "design":
|
|
9
|
-
return "vibe-design";
|
|
10
|
-
case "build":
|
|
11
|
-
default:
|
|
12
|
-
return "vibe-build";
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export function detectLifecycleStage(text: string): VibeLifecycleStage | undefined {
|
|
17
|
-
const lowered = text.toLowerCase();
|
|
18
|
-
if (/(\bgenesis\b|\brequirements\b|\bprd\b|\bscope\b|\bplan first\b|\bblueprint\b)/.test(lowered)) return "genesis";
|
|
19
|
-
if (/(\bdesign\b|\bux\b|\bui\b|\bmockup\b|\bwireframe\b|\bvisual\b)/.test(lowered)) return "design";
|
|
20
|
-
if (/(\bbuild\b|\bimplement\b|\bcode\b|\bship\b|\bwire up\b|\bfeature\b)/.test(lowered)) return "build";
|
|
21
|
-
return undefined;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export function detectRole(text: string): TakomiRole | undefined {
|
|
25
|
-
const lowered = text.toLowerCase();
|
|
26
|
-
if (/(\borchestrate\b|\bcoordinate\b|\bbreak this down\b|\bmulti-step\b|\bmulti step\b|\borchestration session\b)/.test(lowered)) return "orchestrator";
|
|
27
|
-
if (/(\barchitect\b|\bdesign the system\b|\bplan\b|\bspec\b)/.test(lowered)) return "architect";
|
|
28
|
-
if (/(\bdesign\b|\bdesigner\b|\bmockup\b|\bvisual\b)/.test(lowered)) return "design";
|
|
29
|
-
if (/(\bcode\b|\bimplement\b|\bbuild\b|\bfix\b)/.test(lowered)) return "code";
|
|
30
|
-
if (/(\breview\b|\baudit\b|\bcheck\b|\bqa\b)/.test(lowered)) return "review";
|
|
31
|
-
return undefined;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
function isFollowUpExpansionRequest(lowered: string): boolean {
|
|
35
|
-
return /(\bcontinue\b|\bexpand\b|\badd\b|\bnext\b|\bfollow[- ]?up\b|\bcome back\b|\bworking on\b)/.test(lowered);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export function decideRoute(text: string): RouteDecision {
|
|
39
|
-
const lowered = text.toLowerCase();
|
|
40
|
-
const explicitStage = detectLifecycleStage(text);
|
|
41
|
-
const explicitRole = detectRole(text);
|
|
42
|
-
const orchestrationSignal = /(\buse takomi\b|\borchestration session\b|\bbreak this down\b|\bcoordinate\b|\bmulti[- ]part\b|\bmulti[- ]step\b)/.test(lowered);
|
|
43
|
-
const connectors = (lowered.match(/\b(and|then|also|after|while|plus)\b/g) ?? []).length;
|
|
44
|
-
const broad = lowered.length > 220 || connectors >= 2;
|
|
45
|
-
const bigBuildSignal = /(\bminimum usable\b|\bmus\b|\bseveral features\b|\bmultiple features\b|\bwhole project\b|\bfull project\b|\bend to end\b)/.test(lowered);
|
|
46
|
-
const followUp = isFollowUpExpansionRequest(lowered);
|
|
47
|
-
|
|
48
|
-
if (explicitStage) {
|
|
49
|
-
const workflow = stageToWorkflow(explicitStage);
|
|
50
|
-
const def = getWorkflowDefinition(workflow);
|
|
51
|
-
const shouldOrchestrate = orchestrationSignal || broad || bigBuildSignal || (followUp && explicitStage === "build");
|
|
52
|
-
return {
|
|
53
|
-
role: explicitRole ?? def.preferredRole,
|
|
54
|
-
workflow,
|
|
55
|
-
stage: explicitStage,
|
|
56
|
-
executionMode: shouldOrchestrate ? "orchestrate" : "direct",
|
|
57
|
-
sessionRecommendation: shouldOrchestrate ? (broad || bigBuildSignal ? "create" : "consider") : "none",
|
|
58
|
-
reason: `Matched lifecycle stage ${explicitStage}.`,
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
if (explicitRole) {
|
|
63
|
-
const orchestrationRole = explicitRole === "orchestrator";
|
|
64
|
-
return {
|
|
65
|
-
role: explicitRole,
|
|
66
|
-
executionMode: orchestrationRole ? "orchestrate" : "direct",
|
|
67
|
-
sessionRecommendation: orchestrationRole ? "create" : "none",
|
|
68
|
-
reason: `Matched role ${explicitRole}.`,
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
if (orchestrationSignal || broad || bigBuildSignal) {
|
|
73
|
-
return {
|
|
74
|
-
role: "orchestrator",
|
|
75
|
-
workflow: "vibe-build",
|
|
76
|
-
stage: "build",
|
|
77
|
-
executionMode: "orchestrate",
|
|
78
|
-
sessionRecommendation: followUp || bigBuildSignal || broad ? "create" : "consider",
|
|
79
|
-
reason: followUp
|
|
80
|
-
? "Follow-up request appears large enough to merit orchestration."
|
|
81
|
-
: "Broad request defaults to orchestrated Takomi lifecycle handling.",
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
return {
|
|
86
|
-
role: "general",
|
|
87
|
-
executionMode: "direct",
|
|
88
|
-
sessionRecommendation: followUp ? "consider" : "none",
|
|
89
|
-
reason: followUp
|
|
90
|
-
? "Follow-up request may still fit direct execution; decide whether a new session is actually necessary."
|
|
91
|
-
: "No strong route detected; stay adaptive.",
|
|
92
|
-
};
|
|
93
|
-
}
|
|
1
|
+
import { getWorkflowDefinition } from "./workflows";
|
|
2
|
+
import type { RouteDecision, TakomiRole, TakomiWorkflowId, VibeLifecycleStage } from "./types";
|
|
3
|
+
|
|
4
|
+
function stageToWorkflow(stage: VibeLifecycleStage): TakomiWorkflowId {
|
|
5
|
+
switch (stage) {
|
|
6
|
+
case "genesis":
|
|
7
|
+
return "vibe-genesis";
|
|
8
|
+
case "design":
|
|
9
|
+
return "vibe-design";
|
|
10
|
+
case "build":
|
|
11
|
+
default:
|
|
12
|
+
return "vibe-build";
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function detectLifecycleStage(text: string): VibeLifecycleStage | undefined {
|
|
17
|
+
const lowered = text.toLowerCase();
|
|
18
|
+
if (/(\bgenesis\b|\brequirements\b|\bprd\b|\bscope\b|\bplan first\b|\bblueprint\b)/.test(lowered)) return "genesis";
|
|
19
|
+
if (/(\bdesign\b|\bux\b|\bui\b|\bmockup\b|\bwireframe\b|\bvisual\b)/.test(lowered)) return "design";
|
|
20
|
+
if (/(\bbuild\b|\bimplement\b|\bcode\b|\bship\b|\bwire up\b|\bfeature\b)/.test(lowered)) return "build";
|
|
21
|
+
return undefined;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function detectRole(text: string): TakomiRole | undefined {
|
|
25
|
+
const lowered = text.toLowerCase();
|
|
26
|
+
if (/(\borchestrate\b|\bcoordinate\b|\bbreak this down\b|\bmulti-step\b|\bmulti step\b|\borchestration session\b)/.test(lowered)) return "orchestrator";
|
|
27
|
+
if (/(\barchitect\b|\bdesign the system\b|\bplan\b|\bspec\b)/.test(lowered)) return "architect";
|
|
28
|
+
if (/(\bdesign\b|\bdesigner\b|\bmockup\b|\bvisual\b)/.test(lowered)) return "design";
|
|
29
|
+
if (/(\bcode\b|\bimplement\b|\bbuild\b|\bfix\b)/.test(lowered)) return "code";
|
|
30
|
+
if (/(\breview\b|\baudit\b|\bcheck\b|\bqa\b)/.test(lowered)) return "review";
|
|
31
|
+
return undefined;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function isFollowUpExpansionRequest(lowered: string): boolean {
|
|
35
|
+
return /(\bcontinue\b|\bexpand\b|\badd\b|\bnext\b|\bfollow[- ]?up\b|\bcome back\b|\bworking on\b)/.test(lowered);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function decideRoute(text: string): RouteDecision {
|
|
39
|
+
const lowered = text.toLowerCase();
|
|
40
|
+
const explicitStage = detectLifecycleStage(text);
|
|
41
|
+
const explicitRole = detectRole(text);
|
|
42
|
+
const orchestrationSignal = /(\buse takomi\b|\borchestration session\b|\bbreak this down\b|\bcoordinate\b|\bmulti[- ]part\b|\bmulti[- ]step\b)/.test(lowered);
|
|
43
|
+
const connectors = (lowered.match(/\b(and|then|also|after|while|plus)\b/g) ?? []).length;
|
|
44
|
+
const broad = lowered.length > 220 || connectors >= 2;
|
|
45
|
+
const bigBuildSignal = /(\bminimum usable\b|\bmus\b|\bseveral features\b|\bmultiple features\b|\bwhole project\b|\bfull project\b|\bend to end\b)/.test(lowered);
|
|
46
|
+
const followUp = isFollowUpExpansionRequest(lowered);
|
|
47
|
+
|
|
48
|
+
if (explicitStage) {
|
|
49
|
+
const workflow = stageToWorkflow(explicitStage);
|
|
50
|
+
const def = getWorkflowDefinition(workflow);
|
|
51
|
+
const shouldOrchestrate = orchestrationSignal || broad || bigBuildSignal || (followUp && explicitStage === "build");
|
|
52
|
+
return {
|
|
53
|
+
role: explicitRole ?? def.preferredRole,
|
|
54
|
+
workflow,
|
|
55
|
+
stage: explicitStage,
|
|
56
|
+
executionMode: shouldOrchestrate ? "orchestrate" : "direct",
|
|
57
|
+
sessionRecommendation: shouldOrchestrate ? (broad || bigBuildSignal ? "create" : "consider") : "none",
|
|
58
|
+
reason: `Matched lifecycle stage ${explicitStage}.`,
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
if (explicitRole) {
|
|
63
|
+
const orchestrationRole = explicitRole === "orchestrator";
|
|
64
|
+
return {
|
|
65
|
+
role: explicitRole,
|
|
66
|
+
executionMode: orchestrationRole ? "orchestrate" : "direct",
|
|
67
|
+
sessionRecommendation: orchestrationRole ? "create" : "none",
|
|
68
|
+
reason: `Matched role ${explicitRole}.`,
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if (orchestrationSignal || broad || bigBuildSignal) {
|
|
73
|
+
return {
|
|
74
|
+
role: "orchestrator",
|
|
75
|
+
workflow: "vibe-build",
|
|
76
|
+
stage: "build",
|
|
77
|
+
executionMode: "orchestrate",
|
|
78
|
+
sessionRecommendation: followUp || bigBuildSignal || broad ? "create" : "consider",
|
|
79
|
+
reason: followUp
|
|
80
|
+
? "Follow-up request appears large enough to merit orchestration."
|
|
81
|
+
: "Broad request defaults to orchestrated Takomi lifecycle handling.",
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return {
|
|
86
|
+
role: "general",
|
|
87
|
+
executionMode: "direct",
|
|
88
|
+
sessionRecommendation: followUp ? "consider" : "none",
|
|
89
|
+
reason: followUp
|
|
90
|
+
? "Follow-up request may still fit direct execution; decide whether a new session is actually necessary."
|
|
91
|
+
: "No strong route detected; stay adaptive.",
|
|
92
|
+
};
|
|
93
|
+
}
|
|
@@ -1,173 +1,173 @@
|
|
|
1
|
-
export type TakomiRole = "general" | "orchestrator" | "architect" | "design" | "code" | "review";
|
|
2
|
-
|
|
3
|
-
export type TakomiWorkflowId = "vibe-genesis" | "vibe-design" | "vibe-build";
|
|
4
|
-
|
|
5
|
-
export type VibeLifecycleStage = "genesis" | "design" | "build";
|
|
6
|
-
|
|
7
|
-
export type TakomiThinkingLevel = "off" | "minimal" | "low" | "medium" | "high" | "xhigh";
|
|
8
|
-
|
|
9
|
-
export type TakomiDispatchPolicy = "direct" | "subagent" | "review-first";
|
|
10
|
-
|
|
11
|
-
export type TakomiLaunchMode = "auto" | "manual";
|
|
12
|
-
|
|
13
|
-
export type TakomiRunPlacement = "foreground" | "background";
|
|
14
|
-
|
|
15
|
-
export type TakomiAgentScope = "user" | "project" | "both";
|
|
16
|
-
|
|
17
|
-
export type TakomiSubagentMode = "single" | "parallel" | "chain";
|
|
18
|
-
|
|
19
|
-
export type TakomiDispatchDefaults = {
|
|
20
|
-
agent?: string;
|
|
21
|
-
model?: string;
|
|
22
|
-
fallbackModels?: string[];
|
|
23
|
-
thinking?: TakomiThinkingLevel;
|
|
24
|
-
dispatchPolicy?: TakomiDispatchPolicy;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
export type TakomiReviewProfile = {
|
|
28
|
-
enabled: boolean;
|
|
29
|
-
agent?: string;
|
|
30
|
-
maxIterations?: number;
|
|
31
|
-
sameConversation: boolean;
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
export type TakomiProfile = {
|
|
35
|
-
version: 1;
|
|
36
|
-
autoOrchestrate: boolean;
|
|
37
|
-
launchMode?: TakomiLaunchMode;
|
|
38
|
-
foreground?: boolean;
|
|
39
|
-
background?: boolean;
|
|
40
|
-
reviewAfterImplementation?: boolean;
|
|
41
|
-
roles?: Partial<Record<TakomiRole, TakomiDispatchDefaults>>;
|
|
42
|
-
stages?: Partial<Record<VibeLifecycleStage, TakomiDispatchDefaults>>;
|
|
43
|
-
review?: TakomiReviewProfile;
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
export type TakomiDelegationPlanTaskStatus = "planned" | "running" | "completed" | "blocked" | "cancelled";
|
|
47
|
-
|
|
48
|
-
export type TakomiDelegationPlanTask = {
|
|
49
|
-
id: string;
|
|
50
|
-
title: string;
|
|
51
|
-
agent: string;
|
|
52
|
-
task: string;
|
|
53
|
-
role?: TakomiRole;
|
|
54
|
-
stage?: VibeLifecycleStage;
|
|
55
|
-
workflow?: TakomiWorkflowId | string;
|
|
56
|
-
model?: string;
|
|
57
|
-
fallbackModels?: string[];
|
|
58
|
-
thinking?: TakomiThinkingLevel;
|
|
59
|
-
conversationId?: string;
|
|
60
|
-
checklist?: TaskChecklistItem[];
|
|
61
|
-
dispatchPolicy?: TakomiDispatchPolicy;
|
|
62
|
-
review: boolean;
|
|
63
|
-
status: TakomiDelegationPlanTaskStatus;
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
export type TakomiDelegationPlan = {
|
|
67
|
-
planId: string;
|
|
68
|
-
source: "runtime-board" | "takomi-tool";
|
|
69
|
-
launchMode: TakomiLaunchMode;
|
|
70
|
-
placement: TakomiRunPlacement;
|
|
71
|
-
reviewAfterImplementation: boolean;
|
|
72
|
-
createdAt: string;
|
|
73
|
-
sessionId?: string;
|
|
74
|
-
tasks: TakomiDelegationPlanTask[];
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
export type TakomiSubagentTask = {
|
|
78
|
-
agent: string;
|
|
79
|
-
task: string;
|
|
80
|
-
cwd?: string;
|
|
81
|
-
workflow?: string;
|
|
82
|
-
skills?: string[];
|
|
83
|
-
model?: string;
|
|
84
|
-
fallbackModels?: string[];
|
|
85
|
-
thinking?: TakomiThinkingLevel;
|
|
86
|
-
conversationId?: string;
|
|
87
|
-
checklist?: TaskChecklistItem[];
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
export type TakomiSubagentRunGroup = {
|
|
91
|
-
mode: TakomiSubagentMode;
|
|
92
|
-
agentScope: TakomiAgentScope;
|
|
93
|
-
tasks: TakomiSubagentTask[];
|
|
94
|
-
confirmProjectAgents: boolean;
|
|
95
|
-
launchMode: TakomiLaunchMode;
|
|
96
|
-
sessionId?: string;
|
|
97
|
-
};
|
|
98
|
-
|
|
99
|
-
export type WorkflowDefinition = {
|
|
100
|
-
id: TakomiWorkflowId;
|
|
101
|
-
stage: VibeLifecycleStage;
|
|
102
|
-
title: string;
|
|
103
|
-
purpose: string;
|
|
104
|
-
preferredRole: TakomiRole;
|
|
105
|
-
preferredAgent?: string;
|
|
106
|
-
preferredModelHint?: string;
|
|
107
|
-
nextStage?: VibeLifecycleStage;
|
|
108
|
-
playbook: string;
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
export type RouteDecision = {
|
|
112
|
-
role: TakomiRole;
|
|
113
|
-
workflow?: TakomiWorkflowId;
|
|
114
|
-
stage?: VibeLifecycleStage;
|
|
115
|
-
executionMode: "direct" | "orchestrate";
|
|
116
|
-
sessionRecommendation: "none" | "consider" | "create";
|
|
117
|
-
reason: string;
|
|
118
|
-
};
|
|
119
|
-
|
|
120
|
-
export type OrchestratorTaskStatus = "pending" | "in-progress" | "completed" | "blocked";
|
|
121
|
-
|
|
122
|
-
export type TaskChecklistItem = {
|
|
123
|
-
text: string;
|
|
124
|
-
done?: boolean;
|
|
125
|
-
};
|
|
126
|
-
|
|
127
|
-
export type OrchestratorTask = {
|
|
128
|
-
id: string;
|
|
129
|
-
title: string;
|
|
130
|
-
role: TakomiRole;
|
|
131
|
-
stage?: VibeLifecycleStage;
|
|
132
|
-
workflow?: TakomiWorkflowId;
|
|
133
|
-
parentTaskId?: string;
|
|
134
|
-
preferredAgent?: string;
|
|
135
|
-
preferredModelHint?: string;
|
|
136
|
-
preferredModel?: string;
|
|
137
|
-
preferredThinking?: TakomiThinkingLevel;
|
|
138
|
-
fallbackModels?: string[];
|
|
139
|
-
dispatchPolicy?: TakomiDispatchPolicy;
|
|
140
|
-
skills?: string[];
|
|
141
|
-
checklist?: TaskChecklistItem[];
|
|
142
|
-
objective?: string;
|
|
143
|
-
scope?: string[];
|
|
144
|
-
definitionOfDone?: string[];
|
|
145
|
-
expectedArtifacts?: string[];
|
|
146
|
-
dependencies?: string[];
|
|
147
|
-
reviewCheckpoint?: string;
|
|
148
|
-
instructions?: string[];
|
|
149
|
-
status: OrchestratorTaskStatus;
|
|
150
|
-
notes?: string;
|
|
151
|
-
conversationId?: string;
|
|
152
|
-
};
|
|
153
|
-
|
|
154
|
-
export type LifecycleStageState = {
|
|
155
|
-
status: OrchestratorTaskStatus;
|
|
156
|
-
taskIds: string[];
|
|
157
|
-
canExpand?: boolean;
|
|
158
|
-
expandedAt?: string;
|
|
159
|
-
notes?: string;
|
|
160
|
-
};
|
|
161
|
-
|
|
162
|
-
export type SessionIntent = "full-project" | "feature-scope" | "follow-up-task";
|
|
163
|
-
|
|
164
|
-
export type OrchestratorSessionState = {
|
|
165
|
-
sessionId: string;
|
|
166
|
-
title: string;
|
|
167
|
-
createdAt: string;
|
|
168
|
-
updatedAt: string;
|
|
169
|
-
mode: "hybrid";
|
|
170
|
-
lifecycle: Record<VibeLifecycleStage, LifecycleStageState>;
|
|
171
|
-
sessionIntent?: SessionIntent;
|
|
172
|
-
tasks: OrchestratorTask[];
|
|
173
|
-
};
|
|
1
|
+
export type TakomiRole = "general" | "orchestrator" | "architect" | "design" | "code" | "review";
|
|
2
|
+
|
|
3
|
+
export type TakomiWorkflowId = "vibe-genesis" | "vibe-design" | "vibe-build";
|
|
4
|
+
|
|
5
|
+
export type VibeLifecycleStage = "genesis" | "design" | "build";
|
|
6
|
+
|
|
7
|
+
export type TakomiThinkingLevel = "off" | "minimal" | "low" | "medium" | "high" | "xhigh";
|
|
8
|
+
|
|
9
|
+
export type TakomiDispatchPolicy = "direct" | "subagent" | "review-first";
|
|
10
|
+
|
|
11
|
+
export type TakomiLaunchMode = "auto" | "manual";
|
|
12
|
+
|
|
13
|
+
export type TakomiRunPlacement = "foreground" | "background";
|
|
14
|
+
|
|
15
|
+
export type TakomiAgentScope = "user" | "project" | "both";
|
|
16
|
+
|
|
17
|
+
export type TakomiSubagentMode = "single" | "parallel" | "chain";
|
|
18
|
+
|
|
19
|
+
export type TakomiDispatchDefaults = {
|
|
20
|
+
agent?: string;
|
|
21
|
+
model?: string;
|
|
22
|
+
fallbackModels?: string[];
|
|
23
|
+
thinking?: TakomiThinkingLevel;
|
|
24
|
+
dispatchPolicy?: TakomiDispatchPolicy;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export type TakomiReviewProfile = {
|
|
28
|
+
enabled: boolean;
|
|
29
|
+
agent?: string;
|
|
30
|
+
maxIterations?: number;
|
|
31
|
+
sameConversation: boolean;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export type TakomiProfile = {
|
|
35
|
+
version: 1;
|
|
36
|
+
autoOrchestrate: boolean;
|
|
37
|
+
launchMode?: TakomiLaunchMode;
|
|
38
|
+
foreground?: boolean;
|
|
39
|
+
background?: boolean;
|
|
40
|
+
reviewAfterImplementation?: boolean;
|
|
41
|
+
roles?: Partial<Record<TakomiRole, TakomiDispatchDefaults>>;
|
|
42
|
+
stages?: Partial<Record<VibeLifecycleStage, TakomiDispatchDefaults>>;
|
|
43
|
+
review?: TakomiReviewProfile;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export type TakomiDelegationPlanTaskStatus = "planned" | "running" | "completed" | "blocked" | "cancelled";
|
|
47
|
+
|
|
48
|
+
export type TakomiDelegationPlanTask = {
|
|
49
|
+
id: string;
|
|
50
|
+
title: string;
|
|
51
|
+
agent: string;
|
|
52
|
+
task: string;
|
|
53
|
+
role?: TakomiRole;
|
|
54
|
+
stage?: VibeLifecycleStage;
|
|
55
|
+
workflow?: TakomiWorkflowId | string;
|
|
56
|
+
model?: string;
|
|
57
|
+
fallbackModels?: string[];
|
|
58
|
+
thinking?: TakomiThinkingLevel;
|
|
59
|
+
conversationId?: string;
|
|
60
|
+
checklist?: TaskChecklistItem[];
|
|
61
|
+
dispatchPolicy?: TakomiDispatchPolicy;
|
|
62
|
+
review: boolean;
|
|
63
|
+
status: TakomiDelegationPlanTaskStatus;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export type TakomiDelegationPlan = {
|
|
67
|
+
planId: string;
|
|
68
|
+
source: "runtime-board" | "takomi-tool";
|
|
69
|
+
launchMode: TakomiLaunchMode;
|
|
70
|
+
placement: TakomiRunPlacement;
|
|
71
|
+
reviewAfterImplementation: boolean;
|
|
72
|
+
createdAt: string;
|
|
73
|
+
sessionId?: string;
|
|
74
|
+
tasks: TakomiDelegationPlanTask[];
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
export type TakomiSubagentTask = {
|
|
78
|
+
agent: string;
|
|
79
|
+
task: string;
|
|
80
|
+
cwd?: string;
|
|
81
|
+
workflow?: string;
|
|
82
|
+
skills?: string[];
|
|
83
|
+
model?: string;
|
|
84
|
+
fallbackModels?: string[];
|
|
85
|
+
thinking?: TakomiThinkingLevel;
|
|
86
|
+
conversationId?: string;
|
|
87
|
+
checklist?: TaskChecklistItem[];
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
export type TakomiSubagentRunGroup = {
|
|
91
|
+
mode: TakomiSubagentMode;
|
|
92
|
+
agentScope: TakomiAgentScope;
|
|
93
|
+
tasks: TakomiSubagentTask[];
|
|
94
|
+
confirmProjectAgents: boolean;
|
|
95
|
+
launchMode: TakomiLaunchMode;
|
|
96
|
+
sessionId?: string;
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
export type WorkflowDefinition = {
|
|
100
|
+
id: TakomiWorkflowId;
|
|
101
|
+
stage: VibeLifecycleStage;
|
|
102
|
+
title: string;
|
|
103
|
+
purpose: string;
|
|
104
|
+
preferredRole: TakomiRole;
|
|
105
|
+
preferredAgent?: string;
|
|
106
|
+
preferredModelHint?: string;
|
|
107
|
+
nextStage?: VibeLifecycleStage;
|
|
108
|
+
playbook: string;
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
export type RouteDecision = {
|
|
112
|
+
role: TakomiRole;
|
|
113
|
+
workflow?: TakomiWorkflowId;
|
|
114
|
+
stage?: VibeLifecycleStage;
|
|
115
|
+
executionMode: "direct" | "orchestrate";
|
|
116
|
+
sessionRecommendation: "none" | "consider" | "create";
|
|
117
|
+
reason: string;
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
export type OrchestratorTaskStatus = "pending" | "in-progress" | "completed" | "blocked";
|
|
121
|
+
|
|
122
|
+
export type TaskChecklistItem = {
|
|
123
|
+
text: string;
|
|
124
|
+
done?: boolean;
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
export type OrchestratorTask = {
|
|
128
|
+
id: string;
|
|
129
|
+
title: string;
|
|
130
|
+
role: TakomiRole;
|
|
131
|
+
stage?: VibeLifecycleStage;
|
|
132
|
+
workflow?: TakomiWorkflowId;
|
|
133
|
+
parentTaskId?: string;
|
|
134
|
+
preferredAgent?: string;
|
|
135
|
+
preferredModelHint?: string;
|
|
136
|
+
preferredModel?: string;
|
|
137
|
+
preferredThinking?: TakomiThinkingLevel;
|
|
138
|
+
fallbackModels?: string[];
|
|
139
|
+
dispatchPolicy?: TakomiDispatchPolicy;
|
|
140
|
+
skills?: string[];
|
|
141
|
+
checklist?: TaskChecklistItem[];
|
|
142
|
+
objective?: string;
|
|
143
|
+
scope?: string[];
|
|
144
|
+
definitionOfDone?: string[];
|
|
145
|
+
expectedArtifacts?: string[];
|
|
146
|
+
dependencies?: string[];
|
|
147
|
+
reviewCheckpoint?: string;
|
|
148
|
+
instructions?: string[];
|
|
149
|
+
status: OrchestratorTaskStatus;
|
|
150
|
+
notes?: string;
|
|
151
|
+
conversationId?: string;
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
export type LifecycleStageState = {
|
|
155
|
+
status: OrchestratorTaskStatus;
|
|
156
|
+
taskIds: string[];
|
|
157
|
+
canExpand?: boolean;
|
|
158
|
+
expandedAt?: string;
|
|
159
|
+
notes?: string;
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
export type SessionIntent = "full-project" | "feature-scope" | "follow-up-task";
|
|
163
|
+
|
|
164
|
+
export type OrchestratorSessionState = {
|
|
165
|
+
sessionId: string;
|
|
166
|
+
title: string;
|
|
167
|
+
createdAt: string;
|
|
168
|
+
updatedAt: string;
|
|
169
|
+
mode: "hybrid";
|
|
170
|
+
lifecycle: Record<VibeLifecycleStage, LifecycleStageState>;
|
|
171
|
+
sessionIntent?: SessionIntent;
|
|
172
|
+
tasks: OrchestratorTask[];
|
|
173
|
+
};
|