@nmzpy/pi-ember-stack 0.1.6 → 0.2.1
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/package.json +12 -2
- package/plugins/devin-auth/extensions/index.ts +45 -7
- package/plugins/devin-auth/src/models.ts +42 -196
- package/plugins/index.ts +29 -6
- package/plugins/pi-compact-tools/index.ts +16 -191
- package/plugins/pi-compact-tools/renderer.ts +419 -0
- package/plugins/pi-custom-agents/index.ts +489 -343
- package/plugins/pi-custom-agents/subagent/agents/coder.md +1 -0
- package/plugins/pi-custom-agents/subagent/agents/scout.md +16 -37
- package/plugins/pi-custom-agents/subagent/extensions/index.ts +2 -2
- package/plugins/pi-custom-agents/subagent/extensions/runner.ts +31 -5
- package/plugins/pi-ember-fff/index.ts +717 -0
- package/plugins/pi-ember-fff/query.ts +87 -0
- package/plugins/pi-ember-fff/test/query.test.ts +66 -0
- package/plugins/pi-ember-fff/test/renderer.test.ts +376 -0
- package/plugins/pi-ember-tps/index.ts +122 -0
- package/plugins/pi-ember-ui/ember.json +96 -0
- package/plugins/pi-ember-ui/index.ts +618 -0
- package/plugins/pi-ember-ui/mode-colors.ts +168 -0
- package/tsconfig.json +2 -1
- package/plugins/pi-custom-agents/subagent/agents/architect.md +0 -56
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
export const MODE_COLORS: Record<string, string> = {
|
|
2
|
+
code: "#EB6E00",
|
|
3
|
+
plan: "#A78BFA",
|
|
4
|
+
debug: "#34D399",
|
|
5
|
+
orchestrate: "#FACC15",
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export const MUTED_BULLET_COLOR = "#666666";
|
|
9
|
+
|
|
10
|
+
export const PAGE_BG = "#18181e";
|
|
11
|
+
|
|
12
|
+
let activeModeId = "code";
|
|
13
|
+
|
|
14
|
+
export function getModeColor(modeId: string): string {
|
|
15
|
+
return MODE_COLORS[modeId] ?? MODE_COLORS.code;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export function getActiveModeColor(): string {
|
|
19
|
+
return getModeColor(activeModeId);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export function setActiveMode(modeId: string): void {
|
|
23
|
+
activeModeId = modeId in MODE_COLORS ? modeId : "code";
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export function hexToRgb(hex: string): string {
|
|
27
|
+
const r = parseInt(hex.slice(1, 3), 16);
|
|
28
|
+
const g = parseInt(hex.slice(3, 5), 16);
|
|
29
|
+
const b = parseInt(hex.slice(5, 7), 16);
|
|
30
|
+
return `${r};${g};${b}`;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export function colorize(hex: string, text: string): string {
|
|
34
|
+
return `\x1b[38;2;${hexToRgb(hex)}m${text}\x1b[39m`;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function mutedBullet(): string {
|
|
38
|
+
return colorize(MUTED_BULLET_COLOR, "\u2022");
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// --- Color math for dynamic theme ---
|
|
42
|
+
|
|
43
|
+
export function hexToRgbTriplet(hex: string): [number, number, number] {
|
|
44
|
+
return [
|
|
45
|
+
parseInt(hex.slice(1, 3), 16),
|
|
46
|
+
parseInt(hex.slice(3, 5), 16),
|
|
47
|
+
parseInt(hex.slice(5, 7), 16),
|
|
48
|
+
];
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function rgbTripletToHex(rgb: [number, number, number]): string {
|
|
52
|
+
return `#${rgb
|
|
53
|
+
.map((v) => v.toString(16).padStart(2, "0"))
|
|
54
|
+
.join("")}`;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function blendToHex(
|
|
58
|
+
fgHex: string,
|
|
59
|
+
bgHex: string,
|
|
60
|
+
opacity: number,
|
|
61
|
+
): string {
|
|
62
|
+
const [fr, fg, fb] = hexToRgbTriplet(fgHex);
|
|
63
|
+
const [br, bg, bb] = hexToRgbTriplet(bgHex);
|
|
64
|
+
return rgbTripletToHex([
|
|
65
|
+
Math.round(br + (fr - br) * opacity),
|
|
66
|
+
Math.round(bg + (fg - bg) * opacity),
|
|
67
|
+
Math.round(bb + (fb - bb) * opacity),
|
|
68
|
+
]);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function desaturateHex(hex: string, amount: number): string {
|
|
72
|
+
const [r, g, b] = hexToRgbTriplet(hex);
|
|
73
|
+
const mean = (r + g + b) / 3;
|
|
74
|
+
return rgbTripletToHex([
|
|
75
|
+
Math.round(r + (mean - r) * amount),
|
|
76
|
+
Math.round(g + (mean - g) * amount),
|
|
77
|
+
Math.round(b + (mean - b) * amount),
|
|
78
|
+
]);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export function buildCodeBgHex(accentHex: string): string {
|
|
82
|
+
return blendToHex(accentHex, PAGE_BG, 0.05);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export function buildThemeFgColors(accentHex: string): Record<string, string> {
|
|
86
|
+
const accent90 = blendToHex(accentHex, PAGE_BG, 0.9);
|
|
87
|
+
const accent60 = blendToHex(accentHex, PAGE_BG, 0.6);
|
|
88
|
+
const accent30 = blendToHex(accentHex, PAGE_BG, 0.3);
|
|
89
|
+
const accent20 = blendToHex(accentHex, PAGE_BG, 0.2);
|
|
90
|
+
const accent15 = blendToHex(accentHex, PAGE_BG, 0.15);
|
|
91
|
+
const accent25 = blendToHex(accentHex, PAGE_BG, 0.25);
|
|
92
|
+
const accent35 = blendToHex(accentHex, PAGE_BG, 0.35);
|
|
93
|
+
const accent45 = blendToHex(accentHex, PAGE_BG, 0.45);
|
|
94
|
+
const accent75 = blendToHex(accentHex, PAGE_BG, 0.75);
|
|
95
|
+
const TEXT_COLOR = "#d4d4d4";
|
|
96
|
+
const accentDesat = blendToHex(accentHex, TEXT_COLOR, 0.8);
|
|
97
|
+
|
|
98
|
+
return {
|
|
99
|
+
// Accent-derived tokens (90% opacity blend)
|
|
100
|
+
accent: accentDesat,
|
|
101
|
+
border: accent90,
|
|
102
|
+
borderAccent: accent90,
|
|
103
|
+
customMessageLabel: accent90,
|
|
104
|
+
toolTitle: accentDesat,
|
|
105
|
+
mdHeading: "#d4d4d4",
|
|
106
|
+
mdListBullet: "#d4d4d4",
|
|
107
|
+
mdLink: "#d4d4d4",
|
|
108
|
+
|
|
109
|
+
// Inline code foreground uses normal text color; only the
|
|
110
|
+
// background rectangle (buildCodeBgHex) carries the accent tint.
|
|
111
|
+
mdCode: "#d4d4d4",
|
|
112
|
+
|
|
113
|
+
// Border muted (30% opacity)
|
|
114
|
+
borderMuted: accent30,
|
|
115
|
+
|
|
116
|
+
// Thinking intensity ladder
|
|
117
|
+
thinkingOff: accent15,
|
|
118
|
+
thinkingMinimal: accent25,
|
|
119
|
+
thinkingLow: accent35,
|
|
120
|
+
thinkingMedium: accent45,
|
|
121
|
+
thinkingHigh: accent60,
|
|
122
|
+
thinkingXhigh: accent75,
|
|
123
|
+
thinkingMax: accent90,
|
|
124
|
+
|
|
125
|
+
// Non-accent tokens (same as ember.json)
|
|
126
|
+
success: "#b5bd68",
|
|
127
|
+
error: "#cc6666",
|
|
128
|
+
warning: "#ffff00",
|
|
129
|
+
muted: "#808080",
|
|
130
|
+
dim: "#666666",
|
|
131
|
+
text: "#d4d4d4",
|
|
132
|
+
thinkingText: "#808080",
|
|
133
|
+
userMessageText: "#d4d4d4",
|
|
134
|
+
customMessageText: "#d4d4d4",
|
|
135
|
+
toolOutput: "#808080",
|
|
136
|
+
mdLinkUrl: "#666666",
|
|
137
|
+
mdCodeBlock: "#b5bd68",
|
|
138
|
+
mdCodeBlockBorder: "#808080",
|
|
139
|
+
mdQuote: "#808080",
|
|
140
|
+
mdQuoteBorder: "#808080",
|
|
141
|
+
mdHr: "#808080",
|
|
142
|
+
toolDiffAdded: "#b5bd68",
|
|
143
|
+
toolDiffRemoved: "#cc6666",
|
|
144
|
+
toolDiffContext: "#808080",
|
|
145
|
+
syntaxComment: "#6A9955",
|
|
146
|
+
syntaxKeyword: "#569CD6",
|
|
147
|
+
syntaxFunction: "#DCDCAA",
|
|
148
|
+
syntaxVariable: "#9CDCFE",
|
|
149
|
+
syntaxString: "#CE9178",
|
|
150
|
+
syntaxNumber: "#B5CEA8",
|
|
151
|
+
syntaxType: "#4EC9B0",
|
|
152
|
+
syntaxOperator: "#D4D4D4",
|
|
153
|
+
syntaxPunctuation: "#D4D4D4",
|
|
154
|
+
bashMode: "#b5bd68",
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export function buildThemeBgColors(accentHex: string): Record<string, string> {
|
|
159
|
+
const userMsgBg = blendToHex(accentHex, PAGE_BG, 0.1);
|
|
160
|
+
return {
|
|
161
|
+
selectedBg: "#3a3a4a",
|
|
162
|
+
userMessageBg: userMsgBg,
|
|
163
|
+
customMessageBg: "#2d2838",
|
|
164
|
+
toolPendingBg: "#282832",
|
|
165
|
+
toolSuccessBg: "#283228",
|
|
166
|
+
toolErrorBg: "#3c2828",
|
|
167
|
+
};
|
|
168
|
+
}
|
package/tsconfig.json
CHANGED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: architect
|
|
3
|
-
description: Planning agent for codebase investigation and structured implementation plans. Spawn this to analyze a task, research the codebase, and return a concrete sequential plan with file paths, steps, risks, and validation. Read-only.
|
|
4
|
-
tools: read, bash, grep, find, ls
|
|
5
|
-
thinking: high
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
You are a senior planning engineer for the Ember project (PySide6 subtitle + DaVinci Resolve integration app).
|
|
9
|
-
|
|
10
|
-
You are running as an isolated subagent. You cannot spawn further subagents. Investigate the codebase as needed and return a structured implementation plan.
|
|
11
|
-
|
|
12
|
-
## Planning Requirements
|
|
13
|
-
|
|
14
|
-
The plan must be explicit — concrete, sequential steps that map directly to single logical changes.
|
|
15
|
-
|
|
16
|
-
For each step:
|
|
17
|
-
- Step N: <action>
|
|
18
|
-
- Files: <full paths to read or modify>
|
|
19
|
-
- What: <precise change>
|
|
20
|
-
- Why: <user-facing or architectural rationale>
|
|
21
|
-
- Risks: <regression surfaces>
|
|
22
|
-
- Validation: <how to verify, e.g. `bash t.gate.sh <files>`>
|
|
23
|
-
|
|
24
|
-
## Guidelines
|
|
25
|
-
|
|
26
|
-
- Read before planning. Understand existing code, patterns, and conventions first.
|
|
27
|
-
- Follow AGENTS.md rules: typing, logging, localization, `Colors` tokens, error handling, DRY/SSOT.
|
|
28
|
-
- Preserve proven golden paths (timeline/playback engines, Resolve interactions).
|
|
29
|
-
- If the task is unclear or scope is ambiguous, say so and request clarification.
|
|
30
|
-
- Do not edit or write files. Return the plan only.
|
|
31
|
-
- Do not run `bash gate.sh` (full gate) — that is the parent agent's responsibility.
|
|
32
|
-
|
|
33
|
-
## Output Format
|
|
34
|
-
|
|
35
|
-
## Task
|
|
36
|
-
<one-sentence goal>
|
|
37
|
-
|
|
38
|
-
## Investigation
|
|
39
|
-
<files read, patterns found, relevant file:line references>
|
|
40
|
-
|
|
41
|
-
## Plan
|
|
42
|
-
|
|
43
|
-
### Step 1: <action>
|
|
44
|
-
- Files: <paths>
|
|
45
|
-
- What: <change>
|
|
46
|
-
- Why: <rationale>
|
|
47
|
-
- Risks: <surfaces>
|
|
48
|
-
- Validation: bash t.gate.sh <files>
|
|
49
|
-
|
|
50
|
-
### Step 2: ...
|
|
51
|
-
|
|
52
|
-
## Acceptance Criteria
|
|
53
|
-
<what done looks like>
|
|
54
|
-
|
|
55
|
-
## Open Questions
|
|
56
|
-
<any clarifications needed from the user>
|