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,81 +1,81 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://raw.githubusercontent.com/badlogic/pi-mono/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
|
|
3
|
-
"name": "takomi-noir",
|
|
4
|
-
"vars": {
|
|
5
|
-
"bg": "#0A0D12",
|
|
6
|
-
"surface": "#111722",
|
|
7
|
-
"surfaceAlt": "#172131",
|
|
8
|
-
"surfaceWarm": "#1E1A12",
|
|
9
|
-
"surfaceCool": "#0F1B24",
|
|
10
|
-
"line": "#253248",
|
|
11
|
-
"lineSoft": "#324158",
|
|
12
|
-
"ink": "#D8E3F1",
|
|
13
|
-
"slate": "#8A97A7",
|
|
14
|
-
"dimSlate": "#627086",
|
|
15
|
-
"cyan": "#67E8F9",
|
|
16
|
-
"cyanStrong": "#22D3EE",
|
|
17
|
-
"violet": "#A78BFA",
|
|
18
|
-
"amber": "#FBBF24",
|
|
19
|
-
"jade": "#34D399",
|
|
20
|
-
"coral": "#FB7185",
|
|
21
|
-
"blue": "#60A5FA"
|
|
22
|
-
},
|
|
23
|
-
"colors": {
|
|
24
|
-
"accent": "cyanStrong",
|
|
25
|
-
"border": "line",
|
|
26
|
-
"borderAccent": "cyan",
|
|
27
|
-
"borderMuted": "lineSoft",
|
|
28
|
-
"success": "jade",
|
|
29
|
-
"error": "coral",
|
|
30
|
-
"warning": "amber",
|
|
31
|
-
"muted": "slate",
|
|
32
|
-
"dim": "dimSlate",
|
|
33
|
-
"text": "ink",
|
|
34
|
-
"thinkingText": "slate",
|
|
35
|
-
"selectedBg": "surfaceAlt",
|
|
36
|
-
"userMessageBg": "surfaceAlt",
|
|
37
|
-
"userMessageText": "ink",
|
|
38
|
-
"customMessageBg": "surface",
|
|
39
|
-
"customMessageText": "ink",
|
|
40
|
-
"customMessageLabel": "cyan",
|
|
41
|
-
"toolPendingBg": "surfaceCool",
|
|
42
|
-
"toolSuccessBg": "#10231D",
|
|
43
|
-
"toolErrorBg": "#2A141A",
|
|
44
|
-
"toolTitle": "cyan",
|
|
45
|
-
"toolOutput": "ink",
|
|
46
|
-
"mdHeading": "violet",
|
|
47
|
-
"mdLink": "cyan",
|
|
48
|
-
"mdLinkUrl": "blue",
|
|
49
|
-
"mdCode": "cyan",
|
|
50
|
-
"mdCodeBlock": "ink",
|
|
51
|
-
"mdCodeBlockBorder": "lineSoft",
|
|
52
|
-
"mdQuote": "slate",
|
|
53
|
-
"mdQuoteBorder": "lineSoft",
|
|
54
|
-
"mdHr": "lineSoft",
|
|
55
|
-
"mdListBullet": "cyanStrong",
|
|
56
|
-
"toolDiffAdded": "jade",
|
|
57
|
-
"toolDiffRemoved": "coral",
|
|
58
|
-
"toolDiffContext": "slate",
|
|
59
|
-
"syntaxComment": "dimSlate",
|
|
60
|
-
"syntaxKeyword": "violet",
|
|
61
|
-
"syntaxFunction": "cyan",
|
|
62
|
-
"syntaxVariable": "ink",
|
|
63
|
-
"syntaxString": "jade",
|
|
64
|
-
"syntaxNumber": "amber",
|
|
65
|
-
"syntaxType": "blue",
|
|
66
|
-
"syntaxOperator": "cyanStrong",
|
|
67
|
-
"syntaxPunctuation": "slate",
|
|
68
|
-
"thinkingOff": "lineSoft",
|
|
69
|
-
"thinkingMinimal": "violet",
|
|
70
|
-
"thinkingLow": "blue",
|
|
71
|
-
"thinkingMedium": "cyan",
|
|
72
|
-
"thinkingHigh": "amber",
|
|
73
|
-
"thinkingXhigh": "coral",
|
|
74
|
-
"bashMode": "amber"
|
|
75
|
-
},
|
|
76
|
-
"export": {
|
|
77
|
-
"pageBg": "#090C11",
|
|
78
|
-
"cardBg": "#101722",
|
|
79
|
-
"infoBg": "#1A1C11"
|
|
80
|
-
}
|
|
81
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/badlogic/pi-mono/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
|
|
3
|
+
"name": "takomi-noir",
|
|
4
|
+
"vars": {
|
|
5
|
+
"bg": "#0A0D12",
|
|
6
|
+
"surface": "#111722",
|
|
7
|
+
"surfaceAlt": "#172131",
|
|
8
|
+
"surfaceWarm": "#1E1A12",
|
|
9
|
+
"surfaceCool": "#0F1B24",
|
|
10
|
+
"line": "#253248",
|
|
11
|
+
"lineSoft": "#324158",
|
|
12
|
+
"ink": "#D8E3F1",
|
|
13
|
+
"slate": "#8A97A7",
|
|
14
|
+
"dimSlate": "#627086",
|
|
15
|
+
"cyan": "#67E8F9",
|
|
16
|
+
"cyanStrong": "#22D3EE",
|
|
17
|
+
"violet": "#A78BFA",
|
|
18
|
+
"amber": "#FBBF24",
|
|
19
|
+
"jade": "#34D399",
|
|
20
|
+
"coral": "#FB7185",
|
|
21
|
+
"blue": "#60A5FA"
|
|
22
|
+
},
|
|
23
|
+
"colors": {
|
|
24
|
+
"accent": "cyanStrong",
|
|
25
|
+
"border": "line",
|
|
26
|
+
"borderAccent": "cyan",
|
|
27
|
+
"borderMuted": "lineSoft",
|
|
28
|
+
"success": "jade",
|
|
29
|
+
"error": "coral",
|
|
30
|
+
"warning": "amber",
|
|
31
|
+
"muted": "slate",
|
|
32
|
+
"dim": "dimSlate",
|
|
33
|
+
"text": "ink",
|
|
34
|
+
"thinkingText": "slate",
|
|
35
|
+
"selectedBg": "surfaceAlt",
|
|
36
|
+
"userMessageBg": "surfaceAlt",
|
|
37
|
+
"userMessageText": "ink",
|
|
38
|
+
"customMessageBg": "surface",
|
|
39
|
+
"customMessageText": "ink",
|
|
40
|
+
"customMessageLabel": "cyan",
|
|
41
|
+
"toolPendingBg": "surfaceCool",
|
|
42
|
+
"toolSuccessBg": "#10231D",
|
|
43
|
+
"toolErrorBg": "#2A141A",
|
|
44
|
+
"toolTitle": "cyan",
|
|
45
|
+
"toolOutput": "ink",
|
|
46
|
+
"mdHeading": "violet",
|
|
47
|
+
"mdLink": "cyan",
|
|
48
|
+
"mdLinkUrl": "blue",
|
|
49
|
+
"mdCode": "cyan",
|
|
50
|
+
"mdCodeBlock": "ink",
|
|
51
|
+
"mdCodeBlockBorder": "lineSoft",
|
|
52
|
+
"mdQuote": "slate",
|
|
53
|
+
"mdQuoteBorder": "lineSoft",
|
|
54
|
+
"mdHr": "lineSoft",
|
|
55
|
+
"mdListBullet": "cyanStrong",
|
|
56
|
+
"toolDiffAdded": "jade",
|
|
57
|
+
"toolDiffRemoved": "coral",
|
|
58
|
+
"toolDiffContext": "slate",
|
|
59
|
+
"syntaxComment": "dimSlate",
|
|
60
|
+
"syntaxKeyword": "violet",
|
|
61
|
+
"syntaxFunction": "cyan",
|
|
62
|
+
"syntaxVariable": "ink",
|
|
63
|
+
"syntaxString": "jade",
|
|
64
|
+
"syntaxNumber": "amber",
|
|
65
|
+
"syntaxType": "blue",
|
|
66
|
+
"syntaxOperator": "cyanStrong",
|
|
67
|
+
"syntaxPunctuation": "slate",
|
|
68
|
+
"thinkingOff": "lineSoft",
|
|
69
|
+
"thinkingMinimal": "violet",
|
|
70
|
+
"thinkingLow": "blue",
|
|
71
|
+
"thinkingMedium": "cyan",
|
|
72
|
+
"thinkingHigh": "amber",
|
|
73
|
+
"thinkingXhigh": "coral",
|
|
74
|
+
"bashMode": "amber"
|
|
75
|
+
},
|
|
76
|
+
"export": {
|
|
77
|
+
"pageBg": "#090C11",
|
|
78
|
+
"cardBg": "#101722",
|
|
79
|
+
"infoBg": "#1A1C11"
|
|
80
|
+
}
|
|
81
|
+
}
|
package/package.json
CHANGED
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "takomi",
|
|
3
|
-
"version": "2.1.
|
|
4
|
-
"description": "🎯 Stop wrestling with AI. Start building with purpose. The artisan's toolkit for agent workflows, Codex skills, and original Takomi capabilities like 21st.dev integration.",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"bin": {
|
|
7
|
-
"takomi": "bin/takomi.js"
|
|
8
|
-
},
|
|
9
|
-
"files": [
|
|
10
|
-
"bin",
|
|
11
|
-
"src",
|
|
12
|
-
"assets",
|
|
13
|
-
".pi/README.md",
|
|
14
|
-
".pi/agents",
|
|
15
|
-
".pi/extensions",
|
|
16
|
-
".pi/prompts",
|
|
17
|
-
".pi/themes"
|
|
18
|
-
],
|
|
19
|
-
"scripts": {
|
|
20
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
21
|
-
},
|
|
22
|
-
"repository": {
|
|
23
|
-
"type": "git",
|
|
24
|
-
"url": "git+https://github.com/JStaRFilms/VibeCode-Protocol-Suite.git"
|
|
25
|
-
},
|
|
26
|
-
"keywords": [
|
|
27
|
-
"takomi",
|
|
28
|
-
"ai",
|
|
29
|
-
"skills",
|
|
30
|
-
"codex",
|
|
31
|
-
"agentic",
|
|
32
|
-
"21st.dev",
|
|
33
|
-
"vibecode",
|
|
34
|
-
"cursor",
|
|
35
|
-
"windsurf",
|
|
36
|
-
"protocols"
|
|
37
|
-
],
|
|
38
|
-
"author": "J StaR Films Studios",
|
|
39
|
-
"license": "ISC",
|
|
40
|
-
"dependencies": {
|
|
41
|
-
"commander": "^13.1.0",
|
|
42
|
-
"figlet": "^1.8.0",
|
|
43
|
-
"fs-extra": "^11.3.0",
|
|
44
|
-
"pi-subagents": "^0.24.0",
|
|
45
|
-
"picocolors": "^1.1.1",
|
|
46
|
-
"prompts": "^2.4.2"
|
|
47
|
-
},
|
|
48
|
-
"bugs": {
|
|
49
|
-
"url": "https://github.com/JStaRFilms/VibeCode-Protocol-Suite/issues"
|
|
50
|
-
},
|
|
51
|
-
"homepage": "https://github.com/JStaRFilms/VibeCode-Protocol-Suite#readme",
|
|
52
|
-
"devDependencies": {
|
|
53
|
-
"@mariozechner/pi-ai": "^0.70.2",
|
|
54
|
-
"@mariozechner/pi-coding-agent": "^0.70.2",
|
|
55
|
-
"@types/node": "^25.5.2",
|
|
56
|
-
"typebox": "^1.1.33",
|
|
57
|
-
"typescript": "^6.0.2"
|
|
58
|
-
}
|
|
59
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "takomi",
|
|
3
|
+
"version": "2.1.4",
|
|
4
|
+
"description": "🎯 Stop wrestling with AI. Start building with purpose. The artisan's toolkit for agent workflows, Codex skills, and original Takomi capabilities like 21st.dev integration.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"takomi": "bin/takomi.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"bin",
|
|
11
|
+
"src",
|
|
12
|
+
"assets",
|
|
13
|
+
".pi/README.md",
|
|
14
|
+
".pi/agents",
|
|
15
|
+
".pi/extensions",
|
|
16
|
+
".pi/prompts",
|
|
17
|
+
".pi/themes"
|
|
18
|
+
],
|
|
19
|
+
"scripts": {
|
|
20
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
21
|
+
},
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "git+https://github.com/JStaRFilms/VibeCode-Protocol-Suite.git"
|
|
25
|
+
},
|
|
26
|
+
"keywords": [
|
|
27
|
+
"takomi",
|
|
28
|
+
"ai",
|
|
29
|
+
"skills",
|
|
30
|
+
"codex",
|
|
31
|
+
"agentic",
|
|
32
|
+
"21st.dev",
|
|
33
|
+
"vibecode",
|
|
34
|
+
"cursor",
|
|
35
|
+
"windsurf",
|
|
36
|
+
"protocols"
|
|
37
|
+
],
|
|
38
|
+
"author": "J StaR Films Studios",
|
|
39
|
+
"license": "ISC",
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"commander": "^13.1.0",
|
|
42
|
+
"figlet": "^1.8.0",
|
|
43
|
+
"fs-extra": "^11.3.0",
|
|
44
|
+
"pi-subagents": "^0.24.0",
|
|
45
|
+
"picocolors": "^1.1.1",
|
|
46
|
+
"prompts": "^2.4.2"
|
|
47
|
+
},
|
|
48
|
+
"bugs": {
|
|
49
|
+
"url": "https://github.com/JStaRFilms/VibeCode-Protocol-Suite/issues"
|
|
50
|
+
},
|
|
51
|
+
"homepage": "https://github.com/JStaRFilms/VibeCode-Protocol-Suite#readme",
|
|
52
|
+
"devDependencies": {
|
|
53
|
+
"@mariozechner/pi-ai": "^0.70.2",
|
|
54
|
+
"@mariozechner/pi-coding-agent": "^0.70.2",
|
|
55
|
+
"@types/node": "^25.5.2",
|
|
56
|
+
"typebox": "^1.1.33",
|
|
57
|
+
"typescript": "^6.0.2"
|
|
58
|
+
}
|
|
59
|
+
}
|
package/src/cli.js
CHANGED
|
@@ -44,6 +44,7 @@ import { runDoctor } from './doctor.js';
|
|
|
44
44
|
import { ensurePiInstalled, ensurePiSubagentsInstalled, launchTakomiHarness, printPiInstallResult, printPiSubagentsInstallResult } from './pi-harness.js';
|
|
45
45
|
import { installPiHarnessAssets, printPiInstallSummary, syncPiHarnessAssets, validatePiHarnessInstall } from './pi-installer.js';
|
|
46
46
|
import { installBundledSkills, printSkillsInstallSummary, validateSkillsInstall } from './skills-installer.js';
|
|
47
|
+
import { notifyIfTakomiUpdateAvailable, printTakomiUpdateStatus, upgradeTakomiPackage } from './update-check.js';
|
|
47
48
|
|
|
48
49
|
const packageJson = await fs.readJson(PATHS.packageJson);
|
|
49
50
|
const program = new Command();
|
|
@@ -713,6 +714,18 @@ program
|
|
|
713
714
|
.description('Run Pi/Takomi installation diagnostics')
|
|
714
715
|
.action(() => runDoctor({ version: program.version() }));
|
|
715
716
|
|
|
717
|
+
program
|
|
718
|
+
.command('check-update')
|
|
719
|
+
.description('Check whether a newer Takomi package is available')
|
|
720
|
+
.action(() => printTakomiUpdateStatus(program.version()));
|
|
721
|
+
|
|
722
|
+
program
|
|
723
|
+
.command('upgrade')
|
|
724
|
+
.description('Manually update the global Takomi CLI package from npm')
|
|
725
|
+
.action(() => {
|
|
726
|
+
process.exitCode = upgradeTakomiPackage();
|
|
727
|
+
});
|
|
728
|
+
|
|
716
729
|
// Update from GitHub (EXISTING — enhanced)
|
|
717
730
|
program
|
|
718
731
|
.command('update')
|
|
@@ -783,6 +796,7 @@ program
|
|
|
783
796
|
});
|
|
784
797
|
|
|
785
798
|
if (process.argv.length <= 2) {
|
|
799
|
+
notifyIfTakomiUpdateAvailable(program.version());
|
|
786
800
|
const exitCode = await launchTakomiHarness(process.cwd());
|
|
787
801
|
process.exitCode = exitCode;
|
|
788
802
|
} else {
|
package/src/doctor.js
CHANGED
|
@@ -1,84 +1,87 @@
|
|
|
1
|
-
import fs from 'fs-extra';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
console.log(
|
|
21
|
-
console.log(status(
|
|
22
|
-
console.log(status(report.
|
|
23
|
-
console.log(status(report.bundled.
|
|
24
|
-
console.log(status(report.bundled.checks.
|
|
25
|
-
console.log(status(report.bundled.
|
|
26
|
-
console.log(status(report.
|
|
27
|
-
console.log(status(report.installed.
|
|
28
|
-
console.log(status(
|
|
29
|
-
console.log(status(report.installed.
|
|
30
|
-
console.log(status(report.installed.
|
|
31
|
-
console.log(status(
|
|
32
|
-
console.log(status(report.
|
|
33
|
-
console.log(status(report.
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
console.log(status(
|
|
42
|
-
console.log(status(
|
|
43
|
-
|
|
44
|
-
console.log(
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
1
|
+
import fs from 'fs-extra';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import pc from 'picocolors';
|
|
4
|
+
import { inspectPiHarnessEnvironment } from './pi-harness.js';
|
|
5
|
+
import { getStoreSkills, isStoreInitialized } from './store.js';
|
|
6
|
+
import { PI_MANIFEST_PATH } from './pi-installer.js';
|
|
7
|
+
import { SKILLS_MANIFEST_PATH, SKILLS_ROOT } from './skills-installer.js';
|
|
8
|
+
|
|
9
|
+
function status(ok, label, value) {
|
|
10
|
+
const icon = ok ? pc.green('✔') : pc.yellow('✗');
|
|
11
|
+
const suffix = value ? ` ${pc.dim(value)}` : '';
|
|
12
|
+
return ` ${icon} ${label}${suffix}`;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export async function runDoctor({ version, cwd = process.cwd() } = {}) {
|
|
16
|
+
const report = await inspectPiHarnessEnvironment(cwd);
|
|
17
|
+
const storeReady = await isStoreInitialized();
|
|
18
|
+
const storeSkills = storeReady ? await getStoreSkills() : [];
|
|
19
|
+
|
|
20
|
+
console.log(pc.magenta('🩺 Takomi Doctor\n'));
|
|
21
|
+
console.log(status(true, 'Takomi CLI', version || 'unknown'));
|
|
22
|
+
console.log(status(report.pi.installed, 'Pi command', report.pi.installed ? `${report.pi.path}${report.pi.version ? ` (${report.pi.version})` : ''}` : 'missing'));
|
|
23
|
+
console.log(status(report.bundled.packageReady, 'Bundled .pi assets', report.bundled.targets.root));
|
|
24
|
+
console.log(status(report.bundled.checks.runtime, 'Bundled takomi-runtime', report.bundled.targets.runtime));
|
|
25
|
+
console.log(status(report.bundled.checks.subagents, 'Bundled takomi-subagents', report.bundled.targets.subagents));
|
|
26
|
+
console.log(status(report.bundled.packageIncluded, 'Package includes .pi assets', report.bundled.packageIncluded ? 'yes' : 'no'));
|
|
27
|
+
console.log(status(report.installed.runtimeInstalled, 'Installed takomi-runtime', report.installed.targets.extensions));
|
|
28
|
+
console.log(status(report.installed.subagentsInstalled, 'Installed takomi-subagents', report.installed.targets.extensions));
|
|
29
|
+
console.log(status(await fs.pathExists(`${report.installed.targets.extensions}/oauth-router`), 'Installed oauth-router', `${report.installed.targets.extensions}`));
|
|
30
|
+
console.log(status(report.installed.coreInstalled, 'Installed Takomi core', path.join(path.dirname(report.installed.targets.root), 'src', 'pi-takomi-core')));
|
|
31
|
+
console.log(status(report.installed.piSubagentsModuleInstalled, 'Installed pi-subagents module', path.join(report.installed.targets.root, 'node_modules', 'pi-subagents')));
|
|
32
|
+
console.log(status(report.installed.agentsInstalled, 'Installed agents dir', report.installed.targets.agents));
|
|
33
|
+
console.log(status(report.installed.themesInstalled, 'Installed themes dir', report.installed.targets.themes));
|
|
34
|
+
console.log(status(await fs.pathExists(PI_MANIFEST_PATH), 'Pi install manifest', PI_MANIFEST_PATH));
|
|
35
|
+
console.log(status(report.piSubagents.declaredVersion !== null, 'pi-subagents dependency declared', report.piSubagents.declaredVersion || 'missing'));
|
|
36
|
+
console.log(status(report.piSubagents.localInstalled || report.piSubagents.globalInstalled, 'pi-subagents package available', report.piSubagents.localInstalled
|
|
37
|
+
? `${report.piSubagents.localPackageJson}${report.piSubagents.localVersion ? ` (${report.piSubagents.localVersion})` : ''}`
|
|
38
|
+
: report.piSubagents.globalInstalled
|
|
39
|
+
? `${report.piSubagents.globalPackageJson}${report.piSubagents.globalVersion ? ` (${report.piSubagents.globalVersion})` : ''}`
|
|
40
|
+
: 'missing'));
|
|
41
|
+
console.log(status(report.piSubagents.binaryInstalled, 'pi-subagents installer binary', report.piSubagents.binaryPath || 'missing'));
|
|
42
|
+
console.log(status(report.installed.routingPolicyPresent || report.project.routingPolicyPresent, 'Routing policy', report.project.routingPolicyPresent ? report.project.targets.routingPolicy : report.installed.targets.routingPolicy));
|
|
43
|
+
console.log(status(await fs.pathExists(SKILLS_ROOT), 'Installed skills root', SKILLS_ROOT));
|
|
44
|
+
console.log(status(await fs.pathExists(SKILLS_MANIFEST_PATH), 'Skills install manifest', SKILLS_MANIFEST_PATH));
|
|
45
|
+
console.log(status(storeReady, 'Global Takomi store', storeReady ? `${storeSkills.length} skills` : 'missing'));
|
|
46
|
+
|
|
47
|
+
console.log(pc.cyan('\nRecommendations\n'));
|
|
48
|
+
|
|
49
|
+
if (!report.pi.installed) {
|
|
50
|
+
console.log(pc.white(' - Install Pi first: npm install -g @mariozechner/pi-coding-agent'));
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
if (!report.bundled.packageIncluded) {
|
|
54
|
+
console.log(pc.white(' - Package .pi assets before enabling takomi install pi in releases.'));
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
if (!report.installed.runtimeInstalled || !report.installed.subagentsInstalled || !report.installed.coreInstalled || !report.installed.piSubagentsModuleInstalled) {
|
|
58
|
+
console.log(pc.white(' - Run takomi install pi to refresh the Pi harness, Takomi core, and pi-subagents runtime module.'));
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
if (!report.piSubagents.declaredVersion) {
|
|
62
|
+
console.log(pc.white(' - Add pi-subagents to takomi package dependencies so subagent support is bundled intentionally.'));
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
if (!report.piSubagents.localInstalled && !report.piSubagents.globalInstalled) {
|
|
66
|
+
console.log(pc.white(' - Install pi-subagents: npm install -g pi-subagents'));
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
if (!report.project.routingPolicyPresent && !report.installed.routingPolicyPresent) {
|
|
70
|
+
console.log(pc.white(' - Add a routing policy at .pi/takomi/model-routing.md when ready.'));
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if (!await fs.pathExists(PI_MANIFEST_PATH) && report.installed.runtimeInstalled) {
|
|
74
|
+
console.log(pc.white(' - Re-run takomi install pi to write the Pi asset manifest.'));
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if (!await fs.pathExists(SKILLS_ROOT)) {
|
|
78
|
+
console.log(pc.white(' - Run takomi install skills to install the bundled Takomi skills.'));
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
if (!storeReady) {
|
|
82
|
+
console.log(pc.white(' - Legacy global command center is not initialized. Run takomi install for current behavior.'));
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
console.log('');
|
|
86
|
+
return report;
|
|
87
|
+
}
|