oh-my-claudecode 0.2.4 → 0.2.7
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 +103 -4
- package/commands/necronomicon-bind.md +45 -82
- package/dist/agents/builtin-agents.d.ts.map +1 -1
- package/dist/agents/builtin-agents.js +8 -0
- package/dist/agents/builtin-agents.js.map +1 -1
- package/dist/agents/cthulhu.d.ts.map +1 -1
- package/dist/agents/cthulhu.js +11 -0
- package/dist/agents/cthulhu.js.map +1 -1
- package/dist/agents/dagon.d.ts.map +1 -1
- package/dist/agents/dagon.js +13 -0
- package/dist/agents/dagon.js.map +1 -1
- package/dist/agents/nodens-advanced.d.ts +182 -0
- package/dist/agents/nodens-advanced.d.ts.map +1 -0
- package/dist/agents/nodens-advanced.js +297 -0
- package/dist/agents/nodens-advanced.js.map +1 -0
- package/dist/agents/nodens.d.ts +42 -0
- package/dist/agents/nodens.d.ts.map +1 -0
- package/dist/agents/nodens.js +147 -0
- package/dist/agents/nodens.js.map +1 -0
- package/dist/agents/shoggoth.d.ts.map +1 -1
- package/dist/agents/shoggoth.js +11 -1
- package/dist/agents/shoggoth.js.map +1 -1
- package/dist/cli/bind.d.ts +24 -0
- package/dist/cli/bind.d.ts.map +1 -1
- package/dist/cli/bind.js +92 -25
- package/dist/cli/bind.js.map +1 -1
- package/dist/cli/doctor.d.ts.map +1 -1
- package/dist/cli/doctor.js +7 -5
- package/dist/cli/doctor.js.map +1 -1
- package/dist/cli/index.js +54 -4
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/version.d.ts +2 -0
- package/dist/cli/version.d.ts.map +1 -0
- package/dist/cli/version.js +28 -0
- package/dist/cli/version.js.map +1 -0
- package/dist/config/schema.d.ts +648 -17
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js +21 -2
- package/dist/config/schema.js.map +1 -1
- package/dist/features/web-research-background/advanced-patterns.d.ts +44 -0
- package/dist/features/web-research-background/advanced-patterns.d.ts.map +1 -0
- package/dist/features/web-research-background/advanced-patterns.js +139 -0
- package/dist/features/web-research-background/advanced-patterns.js.map +1 -0
- package/dist/features/web-research-background/index.d.ts +73 -0
- package/dist/features/web-research-background/index.d.ts.map +1 -0
- package/dist/features/web-research-background/index.js +131 -0
- package/dist/features/web-research-background/index.js.map +1 -0
- package/dist/features/yith-archive/functions/opencode-import.d.ts.map +1 -1
- package/dist/features/yith-archive/functions/opencode-import.js +129 -90
- package/dist/features/yith-archive/functions/opencode-import.js.map +1 -1
- package/dist/features/yith-archive/index.d.ts +8 -0
- package/dist/features/yith-archive/index.d.ts.map +1 -1
- package/dist/features/yith-archive/index.js +1 -0
- package/dist/features/yith-archive/index.js.map +1 -1
- package/dist/features/yith-archive/types.d.ts +15 -0
- package/dist/features/yith-archive/types.d.ts.map +1 -1
- package/dist/hooks/design-detector-hook.d.ts +12 -0
- package/dist/hooks/design-detector-hook.d.ts.map +1 -0
- package/dist/hooks/design-detector-hook.js +42 -0
- package/dist/hooks/design-detector-hook.js.map +1 -0
- package/dist/hooks/design-detector.d.ts +47 -0
- package/dist/hooks/design-detector.d.ts.map +1 -0
- package/dist/hooks/design-detector.js +251 -0
- package/dist/hooks/design-detector.js.map +1 -0
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +27 -0
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/web-research-detector.d.ts +58 -0
- package/dist/hooks/web-research-detector.d.ts.map +1 -0
- package/dist/hooks/web-research-detector.js +205 -0
- package/dist/hooks/web-research-detector.js.map +1 -0
- package/dist/hooks/web-research-hook.d.ts +12 -0
- package/dist/hooks/web-research-hook.d.ts.map +1 -0
- package/dist/hooks/web-research-hook.js +43 -0
- package/dist/hooks/web-research-hook.js.map +1 -0
- package/dist/hooks/yith-capture.d.ts +35 -0
- package/dist/hooks/yith-capture.d.ts.map +1 -0
- package/dist/hooks/yith-capture.js +113 -0
- package/dist/hooks/yith-capture.js.map +1 -0
- package/dist/linters/type-safety-ast.d.ts +108 -0
- package/dist/linters/type-safety-ast.d.ts.map +1 -0
- package/dist/linters/type-safety-ast.js +293 -0
- package/dist/linters/type-safety-ast.js.map +1 -0
- package/dist/linters/type-safety-linter.d.ts +66 -0
- package/dist/linters/type-safety-linter.d.ts.map +1 -0
- package/dist/linters/type-safety-linter.js +317 -0
- package/dist/linters/type-safety-linter.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nodens-advanced.d.ts","sourceRoot":"","sources":["../../src/agents/nodens-advanced.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,YAAY,CAAC,EAAE,CAAC,gBAAgB,GAAG,YAAY,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,CAAC,EAAE,CAAA;CACnF;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,OAAO,CAAA;IAChB,SAAS,CAAC,EAAE,GAAG,GAAG,IAAI,GAAG,KAAK,CAAA;IAC9B,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;IAChB,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,OAAO,CAAA;IAChB,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,wBAAwB,CAAC,EAAE,OAAO,CAAA;IAClC,uBAAuB,CAAC,EAAE,OAAO,CAAA;IACjC,WAAW,CAAC,EAAE,MAAM,CA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EACrB,MAAM,CAAC,EAAE,gBAAgB,GACxB,mBAAmB,CAqFrB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,KAAK,CAAC,EAAE,WAAW,CAAA;IACnB,IAAI,CAAC,EAAE,UAAU,CAAA;IACjB,UAAU,CAAC,EAAE,gBAAgB,CAAA;CAC9B;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,MAAM,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAEtE;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,MAAM,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAErE;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,MAAM,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAEpE;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAE1E"}
|
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Nodens - Advanced Design Capabilities
|
|
3
|
+
*
|
|
4
|
+
* Extensions for vision analysis, Figma integration, A11y automation, and Playwright testing.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Perform vision analysis on component screenshot
|
|
8
|
+
*
|
|
9
|
+
* @param imageData - Base64 image or image path
|
|
10
|
+
* @param config - Vision configuration
|
|
11
|
+
* @returns Vision analysis result
|
|
12
|
+
*/
|
|
13
|
+
export async function analyzeComponentVision(imageData, config) {
|
|
14
|
+
if (!config?.enabled) {
|
|
15
|
+
return {
|
|
16
|
+
success: false,
|
|
17
|
+
issues: ["Vision analysis disabled"],
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
// Placeholder implementation
|
|
21
|
+
// In production: Call vision model API with image
|
|
22
|
+
return {
|
|
23
|
+
success: true,
|
|
24
|
+
colors: {
|
|
25
|
+
dominant: ["#2563eb", "#ffffff", "#f3f4f6"],
|
|
26
|
+
palette: ["#2563eb", "#1e40af", "#3b82f6"],
|
|
27
|
+
contrast: [
|
|
28
|
+
{ ratio: 8.5, wcagLevel: "AAA" },
|
|
29
|
+
{ ratio: 5.2, wcagLevel: "AA" },
|
|
30
|
+
],
|
|
31
|
+
},
|
|
32
|
+
typography: {
|
|
33
|
+
families: ["Inter", "Fira Code"],
|
|
34
|
+
sizes: [12, 14, 16, 18, 20, 24],
|
|
35
|
+
weights: ["400", "500", "600", "700"],
|
|
36
|
+
},
|
|
37
|
+
spacing: {
|
|
38
|
+
consistent: true,
|
|
39
|
+
baseUnit: 4,
|
|
40
|
+
scale: [4, 8, 12, 16, 20, 24, 32, 40, 48],
|
|
41
|
+
},
|
|
42
|
+
layout: {
|
|
43
|
+
type: "responsive",
|
|
44
|
+
breakpoints: [640, 768, 1024, 1280],
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Extract design tokens from Figma file
|
|
50
|
+
*
|
|
51
|
+
* @param figmaUrl - Figma file URL
|
|
52
|
+
* @param config - Figma configuration
|
|
53
|
+
* @returns Figma extraction result
|
|
54
|
+
*/
|
|
55
|
+
export async function extractFigmaTokens(figmaUrl, config) {
|
|
56
|
+
if (!config?.enabled) {
|
|
57
|
+
return {
|
|
58
|
+
success: false,
|
|
59
|
+
issues: ["Figma integration disabled"],
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
// Placeholder: Parse Figma URL
|
|
63
|
+
const figmaFileMatch = figmaUrl.match(/\/file\/([a-zA-Z0-9]+)/);
|
|
64
|
+
const fileId = figmaFileMatch?.[1];
|
|
65
|
+
if (!fileId) {
|
|
66
|
+
return {
|
|
67
|
+
success: false,
|
|
68
|
+
issues: ["Invalid Figma URL format"],
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
// Placeholder implementation
|
|
72
|
+
// In production: Use Figma API with apiToken to fetch design metadata
|
|
73
|
+
return {
|
|
74
|
+
success: true,
|
|
75
|
+
fileId,
|
|
76
|
+
colors: [
|
|
77
|
+
{
|
|
78
|
+
name: "Primary",
|
|
79
|
+
value: "#2563eb",
|
|
80
|
+
category: "color",
|
|
81
|
+
description: "Primary brand color",
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: "Accent",
|
|
85
|
+
value: "#f59e0b",
|
|
86
|
+
category: "color",
|
|
87
|
+
description: "Accent/warning color",
|
|
88
|
+
},
|
|
89
|
+
],
|
|
90
|
+
typography: [
|
|
91
|
+
{
|
|
92
|
+
name: "Heading 1",
|
|
93
|
+
value: "Inter, 32px, 700",
|
|
94
|
+
category: "typography",
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
name: "Body",
|
|
98
|
+
value: "Inter, 16px, 400",
|
|
99
|
+
category: "typography",
|
|
100
|
+
},
|
|
101
|
+
],
|
|
102
|
+
spacing: [
|
|
103
|
+
{ name: "XSmall", value: "4px", category: "spacing" },
|
|
104
|
+
{ name: "Small", value: "8px", category: "spacing" },
|
|
105
|
+
{ name: "Medium", value: "16px", category: "spacing" },
|
|
106
|
+
],
|
|
107
|
+
components: [
|
|
108
|
+
{ name: "Button", variants: ["Primary", "Secondary", "Outline"] },
|
|
109
|
+
{ name: "Card", variants: ["Default", "Elevated", "Outlined"] },
|
|
110
|
+
],
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Generate A11y audit test code
|
|
115
|
+
*
|
|
116
|
+
* @param componentName - Component name
|
|
117
|
+
* @param config - A11y configuration
|
|
118
|
+
* @returns A11y audit result with test code
|
|
119
|
+
*/
|
|
120
|
+
export async function generateA11yAuditCode(componentName, config) {
|
|
121
|
+
if (!config?.enabled) {
|
|
122
|
+
return {
|
|
123
|
+
success: false,
|
|
124
|
+
violations: [],
|
|
125
|
+
passes: [],
|
|
126
|
+
wcagAACompliant: false,
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
const wcagLevel = config?.wcagLevel || "AA";
|
|
130
|
+
const testCode = `
|
|
131
|
+
import { test, expect } from "@playwright/test"
|
|
132
|
+
import { injectAxe, checkA11y } from "axe-playwright"
|
|
133
|
+
|
|
134
|
+
test("${componentName}: WCAG ${wcagLevel} compliance", async ({ page }) => {
|
|
135
|
+
await page.goto("/components/${componentName}")
|
|
136
|
+
await injectAxe(page)
|
|
137
|
+
|
|
138
|
+
const results = await page.evaluate(async () => {
|
|
139
|
+
const axeResults = await (window as any).axe.run()
|
|
140
|
+
return axeResults
|
|
141
|
+
})
|
|
142
|
+
|
|
143
|
+
expect(results.violations.length).toBe(0)
|
|
144
|
+
expect(results.passes.length).toBeGreaterThan(0)
|
|
145
|
+
})
|
|
146
|
+
|
|
147
|
+
test("${componentName}: Keyboard navigation", async ({ page }) => {
|
|
148
|
+
await page.goto("/components/${componentName}")
|
|
149
|
+
|
|
150
|
+
// Tab through interactive elements
|
|
151
|
+
await page.keyboard.press("Tab")
|
|
152
|
+
const focused = await page.evaluate(() => document.activeElement?.className)
|
|
153
|
+
expect(focused).toBeTruthy()
|
|
154
|
+
})
|
|
155
|
+
|
|
156
|
+
test("${componentName}: Screen reader compatibility", async ({ page }) => {
|
|
157
|
+
await page.goto("/components/${componentName}")
|
|
158
|
+
|
|
159
|
+
// Check ARIA labels
|
|
160
|
+
const ariaLabels = await page.locator("[aria-label]").all()
|
|
161
|
+
expect(ariaLabels.length).toBeGreaterThan(0)
|
|
162
|
+
})
|
|
163
|
+
|
|
164
|
+
test("${componentName}: Color contrast", async ({ page }) => {
|
|
165
|
+
await page.goto("/components/${componentName}")
|
|
166
|
+
await injectAxe(page)
|
|
167
|
+
|
|
168
|
+
const violations = await page.evaluate(async () => {
|
|
169
|
+
const results = await (window as any).axe.run({
|
|
170
|
+
rules: { color-contrast: { enabled: true } },
|
|
171
|
+
})
|
|
172
|
+
return results.violations
|
|
173
|
+
})
|
|
174
|
+
|
|
175
|
+
expect(violations.length).toBe(0)
|
|
176
|
+
})
|
|
177
|
+
`.trim();
|
|
178
|
+
return {
|
|
179
|
+
success: true,
|
|
180
|
+
violations: [],
|
|
181
|
+
passes: ["color-contrast", "aria-label", "keyboard-navigation"],
|
|
182
|
+
wcagAACompliant: true,
|
|
183
|
+
testCode,
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Generate Playwright test suite for component
|
|
188
|
+
*
|
|
189
|
+
* @param componentName - Component name
|
|
190
|
+
* @param config - Playwright configuration
|
|
191
|
+
* @returns Playwright test suite
|
|
192
|
+
*/
|
|
193
|
+
export function generatePlaywrightTests(componentName, config) {
|
|
194
|
+
const breakpoints = config?.breakpoints || { mobile: 375, tablet: 768, desktop: 1280 };
|
|
195
|
+
const visualTests = `
|
|
196
|
+
import { test, expect } from "@playwright/test"
|
|
197
|
+
|
|
198
|
+
test.describe("${componentName}: Visual Regression", () => {
|
|
199
|
+
test("default state", async ({ page }) => {
|
|
200
|
+
await page.goto("/components/${componentName}")
|
|
201
|
+
await expect(page).toHaveScreenshot("${componentName}-default.png")
|
|
202
|
+
})
|
|
203
|
+
|
|
204
|
+
test("hover state", async ({ page }) => {
|
|
205
|
+
await page.goto("/components/${componentName}")
|
|
206
|
+
await page.locator("[data-testid=primary]").hover()
|
|
207
|
+
await expect(page).toHaveScreenshot("${componentName}-hover.png")
|
|
208
|
+
})
|
|
209
|
+
|
|
210
|
+
test("active state", async ({ page }) => {
|
|
211
|
+
await page.goto("/components/${componentName}")
|
|
212
|
+
await page.locator("[data-testid=primary]").click()
|
|
213
|
+
await expect(page).toHaveScreenshot("${componentName}-active.png")
|
|
214
|
+
})
|
|
215
|
+
|
|
216
|
+
test("focus state", async ({ page }) => {
|
|
217
|
+
await page.goto("/components/${componentName}")
|
|
218
|
+
await page.locator("[data-testid=primary]").focus()
|
|
219
|
+
await expect(page).toHaveScreenshot("${componentName}-focus.png")
|
|
220
|
+
})
|
|
221
|
+
})
|
|
222
|
+
`.trim();
|
|
223
|
+
const interactionTests = `
|
|
224
|
+
import { test, expect } from "@playwright/test"
|
|
225
|
+
|
|
226
|
+
test.describe("${componentName}: Interactions", () => {
|
|
227
|
+
test("click triggers action", async ({ page }) => {
|
|
228
|
+
await page.goto("/components/${componentName}")
|
|
229
|
+
let clicked = false
|
|
230
|
+
await page.evaluate(() => {
|
|
231
|
+
window.addEventListener("click", () => {
|
|
232
|
+
;(window as any).clicked = true
|
|
233
|
+
})
|
|
234
|
+
})
|
|
235
|
+
await page.locator("[data-testid=primary]").click()
|
|
236
|
+
const wasClicked = await page.evaluate(() => (window as any).clicked)
|
|
237
|
+
expect(wasClicked).toBeTruthy()
|
|
238
|
+
})
|
|
239
|
+
|
|
240
|
+
test("handles disabled state", async ({ page }) => {
|
|
241
|
+
await page.goto("/components/${componentName}?disabled=true")
|
|
242
|
+
await expect(page.locator("[data-testid=primary]")).toBeDisabled()
|
|
243
|
+
})
|
|
244
|
+
|
|
245
|
+
test("displays loading state", async ({ page }) => {
|
|
246
|
+
await page.goto("/components/${componentName}?loading=true")
|
|
247
|
+
await expect(page.locator("[data-testid=spinner]")).toBeVisible()
|
|
248
|
+
})
|
|
249
|
+
})
|
|
250
|
+
`.trim();
|
|
251
|
+
const responsiveTests = `
|
|
252
|
+
import { test, expect } from "@playwright/test"
|
|
253
|
+
|
|
254
|
+
test.describe("${componentName}: Responsive Design", () => {
|
|
255
|
+
${Object.entries(breakpoints)
|
|
256
|
+
.map(([name, width]) => `
|
|
257
|
+
test("renders correctly at ${name} (${width}px)", async ({ page }) => {
|
|
258
|
+
await page.setViewportSize({ width: ${width}, height: 800 })
|
|
259
|
+
await page.goto("/components/${componentName}")
|
|
260
|
+
await expect(page).toHaveScreenshot("${componentName}-${name}.png")
|
|
261
|
+
})
|
|
262
|
+
`)
|
|
263
|
+
.join("")}
|
|
264
|
+
})
|
|
265
|
+
`.trim();
|
|
266
|
+
return {
|
|
267
|
+
visualTests,
|
|
268
|
+
interactionTests,
|
|
269
|
+
responsiveTests,
|
|
270
|
+
a11yTests: "", // Populated by generateA11yAuditCode
|
|
271
|
+
};
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* Check if vision is enabled
|
|
275
|
+
*/
|
|
276
|
+
export function isVisionEnabled(config) {
|
|
277
|
+
return config?.vision?.enabled ?? false;
|
|
278
|
+
}
|
|
279
|
+
/**
|
|
280
|
+
* Check if Figma integration is enabled
|
|
281
|
+
*/
|
|
282
|
+
export function isFigmaEnabled(config) {
|
|
283
|
+
return config?.figma?.enabled ?? false;
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* Check if A11y automation is enabled
|
|
287
|
+
*/
|
|
288
|
+
export function isA11yEnabled(config) {
|
|
289
|
+
return config?.a11y?.enabled ?? false;
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* Check if Playwright testing is enabled
|
|
293
|
+
*/
|
|
294
|
+
export function isPlaywrightEnabled(config) {
|
|
295
|
+
return config?.playwright?.enabled ?? false;
|
|
296
|
+
}
|
|
297
|
+
//# sourceMappingURL=nodens-advanced.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nodens-advanced.js","sourceRoot":"","sources":["../../src/agents/nodens-advanced.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAgIH;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAC1C,SAAiB,EACjB,MAAqB;IAErB,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC;QACrB,OAAO;YACL,OAAO,EAAE,KAAK;YACd,MAAM,EAAE,CAAC,0BAA0B,CAAC;SACrC,CAAA;IACH,CAAC;IAED,6BAA6B;IAC7B,kDAAkD;IAClD,OAAO;QACL,OAAO,EAAE,IAAI;QACb,MAAM,EAAE;YACN,QAAQ,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC;YAC3C,OAAO,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC;YAC1C,QAAQ,EAAE;gBACR,EAAE,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,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CACE;SACA,IAAI,CAAC,EAAE,CAAC;;GAER,CAAC,IAAI,EAAE,CAAA;IAER,OAAO;QACL,WAAW;QACX,gBAAgB;QAChB,eAAe;QACf,SAAS,EAAE,EAAE,EAAE,qCAAqC;KACrD,CAAA;AACH,CAAC;AAYD;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,MAA6B;IAC3D,OAAO,MAAM,EAAE,MAAM,EAAE,OAAO,IAAI,KAAK,CAAA;AACzC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,MAA6B;IAC1D,OAAO,MAAM,EAAE,KAAK,EAAE,OAAO,IAAI,KAAK,CAAA;AACxC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,MAA6B;IACzD,OAAO,MAAM,EAAE,IAAI,EAAE,OAAO,IAAI,KAAK,CAAA;AACvC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,mBAAmB,CAAC,MAA6B;IAC/D,OAAO,MAAM,EAAE,UAAU,EAAE,OAAO,IAAI,KAAK,CAAA;AAC7C,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Nodens — Frontend Design Specialization Agent
|
|
3
|
+
*
|
|
4
|
+
* A subagent that specializes in frontend and UI/UX design tasks.
|
|
5
|
+
* Guides users through design methodology: intent → spec → implementation → polish
|
|
6
|
+
* Named after Nodens, Lovecraftian god of craftsmanship and artistry.
|
|
7
|
+
*/
|
|
8
|
+
import type { AgentConfig, AgentPromptMetadata } from "./types.js";
|
|
9
|
+
import type { AvailableAgent, AvailableSkill, AvailableCategory } from "./types.js";
|
|
10
|
+
/**
|
|
11
|
+
* Prompt metadata for Nodens — instructs Cthulhu orchestrator
|
|
12
|
+
*/
|
|
13
|
+
export declare const NODENS_PROMPT_METADATA: AgentPromptMetadata;
|
|
14
|
+
/**
|
|
15
|
+
* System prompt for Nodens
|
|
16
|
+
*
|
|
17
|
+
* Guides the agent through a design-first methodology:
|
|
18
|
+
* 1. Intent: Understand what the user wants to build and why
|
|
19
|
+
* 2. Specification: Define the design in words before implementing
|
|
20
|
+
* 3. Implementation: Code the component following the spec
|
|
21
|
+
* 4. Polish: Refine, add accessibility, responsive breakpoints, animations
|
|
22
|
+
*/
|
|
23
|
+
export declare const NODENS_PROMPT = "You are Nodens \u2014 god of craftsmanship, a frontend design specialization agent within oh-my-claudecode.\n\n## DESIGN PHILOSOPHY\nYour job is to help users craft beautiful, accessible, well-designed interfaces and components.\nYou follow a **Design-First Methodology**:\n\n1. **Intent** \u2014 Clarify what the user wants to build and why. Ask clarifying questions.\n - What's the purpose? Who's the user? What problem does it solve?\n\n2. **Specification** \u2014 Define the design before code. Use words, not code yet.\n - Layout structure, typography, colors, spacing, interactions, accessibility needs\n - Create a visual/textual specification that the user approves\n\n3. **Implementation** \u2014 Write clean, accessible code following the spec.\n - Use semantic HTML, proper ARIA labels, keyboard navigation\n - Follow WCAG 2.1 accessibility standards\n - Use CSS Grid/Flexbox for layout, mobile-first responsive design\n - Consider design tokens (colors, typography, spacing scales)\n\n4. **Polish** \u2014 Refine the component.\n - Add animations/transitions for better UX\n - Test responsive behavior across breakpoints\n - Verify accessibility with screen readers\n - Optimize performance (lazy loading, code splitting)\n\n## KEY PRINCIPLES\n- **Accessibility First** \u2014 WCAG 2.1 AA standard minimum\n- **Responsive by Default** \u2014 Mobile-first approach, test on small/medium/large screens\n- **Design Tokens** \u2014 Use consistent spacing, colors, typography via tokens/CSS vars\n- **Performance** \u2014 Optimize bundle size, avoid unnecessary re-renders\n- **Documentation** \u2014 Document component API, usage examples, edge cases\n- **Component Reusability** \u2014 Design for composition and reuse\n\n## TOOLS\nYou have access to:\n- Read/Write/Edit \u2014 For working with component files\n- WebFetch \u2014 For design inspiration, documentation\n- WebSearch \u2014 For latest UI/UX patterns, accessibility best practices\n- Bash \u2014 For building, testing, previewing components\n\n## WORKFLOW FOR DESIGN TASKS\n1. Ask clarifying questions about intent (audience, purpose, constraints)\n2. Propose a specification (layout, colors, typography, interactions)\n3. Get approval before implementing\n4. Write the component code (HTML, CSS, JavaScript/TypeScript)\n5. Add accessibility features (ARIA, semantic HTML, keyboard nav)\n6. Ensure responsive design (test at multiple breakpoints)\n7. Document the component (API, examples, accessibility notes)\n\n## WHEN TO DEFER\n- Backend/API design \u2192 refer to Yog-Sothoth (architecture advisor)\n- Rapid prototyping (low quality) \u2192 refer to Hastur (fast turnaround)\n- Code review/quality \u2192 refer to Tsathoggua (quality reviewer)\n- Search/exploration \u2192 refer to Dagon (search specialist)\n\nRemember: Good design is invisible. Users shouldn't think about the interface \u2014 they should just use it.\nAccessibility and performance are features, not afterthoughts.";
|
|
24
|
+
/**
|
|
25
|
+
* Factory function to create Nodens agent configuration
|
|
26
|
+
*
|
|
27
|
+
* @param model - The Claude model to use for this agent
|
|
28
|
+
* @param availableAgents - List of available agents (for prompt context)
|
|
29
|
+
* @param availableToolNames - List of available tools (for tool config)
|
|
30
|
+
* @param availableSkills - List of available skills (for skill injection)
|
|
31
|
+
* @param availableCategories - List of available categories (for category context)
|
|
32
|
+
* @returns AgentConfig for Nodens
|
|
33
|
+
*/
|
|
34
|
+
export declare function createNodenAgent(model: string, availableAgents?: AvailableAgent[], availableToolNames?: string[], availableSkills?: AvailableSkill[], availableCategories?: AvailableCategory[]): AgentConfig;
|
|
35
|
+
/**
|
|
36
|
+
* Export metadata for registration in AGENT_METADATA_MAP
|
|
37
|
+
*/
|
|
38
|
+
export declare const NODENS_AGENT_METADATA: {
|
|
39
|
+
metadata: AgentPromptMetadata;
|
|
40
|
+
factory: typeof createNodenAgent;
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=nodens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nodens.d.ts","sourceRoot":"","sources":["../../src/agents/nodens.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA;AAClE,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAEnF;;GAEG;AACH,eAAO,MAAM,sBAAsB,EAAE,mBAyBpC,CAAA;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,aAAa,46FAwDqC,CAAA;AAE/D;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,MAAM,EACb,eAAe,CAAC,EAAE,cAAc,EAAE,EAClC,kBAAkB,CAAC,EAAE,MAAM,EAAE,EAC7B,eAAe,CAAC,EAAE,cAAc,EAAE,EAClC,mBAAmB,CAAC,EAAE,iBAAiB,EAAE,GACxC,WAAW,CA6Bb;AAED;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;CAGjC,CAAA"}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Nodens — Frontend Design Specialization Agent
|
|
3
|
+
*
|
|
4
|
+
* A subagent that specializes in frontend and UI/UX design tasks.
|
|
5
|
+
* Guides users through design methodology: intent → spec → implementation → polish
|
|
6
|
+
* Named after Nodens, Lovecraftian god of craftsmanship and artistry.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Prompt metadata for Nodens — instructs Cthulhu orchestrator
|
|
10
|
+
*/
|
|
11
|
+
export const NODENS_PROMPT_METADATA = {
|
|
12
|
+
category: "utility",
|
|
13
|
+
cost: "MODERATE",
|
|
14
|
+
promptAlias: "Nodens",
|
|
15
|
+
keyTrigger: "Design, UI/UX, component, interface, layout, accessibility",
|
|
16
|
+
useWhen: [
|
|
17
|
+
"User asks to design or build a component",
|
|
18
|
+
"User needs UI/UX guidance or design system recommendations",
|
|
19
|
+
"User wants accessibility (a11y) or responsive design help",
|
|
20
|
+
"User is working on frontend architecture or design tokens",
|
|
21
|
+
"User needs design methodology: intent → spec → impl → polish",
|
|
22
|
+
],
|
|
23
|
+
avoidWhen: [
|
|
24
|
+
"Backend-only work (databases, APIs, server logic)",
|
|
25
|
+
"User explicitly asks for speed (fast, quick) — use Hastur instead",
|
|
26
|
+
"Low-level infrastructure or DevOps tasks",
|
|
27
|
+
],
|
|
28
|
+
triggers: [
|
|
29
|
+
{ domain: "component", trigger: "Design a React/Vue/Svelte/Angular component" },
|
|
30
|
+
{ domain: "ui", trigger: "Create a UI layout, card, button, form" },
|
|
31
|
+
{ domain: "interface", trigger: "Design an interface or specification" },
|
|
32
|
+
{ domain: "a11y", trigger: "Accessibility improvements, WCAG compliance" },
|
|
33
|
+
{ domain: "responsive", trigger: "Mobile-first, responsive design, breakpoints" },
|
|
34
|
+
{ domain: "design-tokens", trigger: "Design system, design tokens, theming" },
|
|
35
|
+
],
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* System prompt for Nodens
|
|
39
|
+
*
|
|
40
|
+
* Guides the agent through a design-first methodology:
|
|
41
|
+
* 1. Intent: Understand what the user wants to build and why
|
|
42
|
+
* 2. Specification: Define the design in words before implementing
|
|
43
|
+
* 3. Implementation: Code the component following the spec
|
|
44
|
+
* 4. Polish: Refine, add accessibility, responsive breakpoints, animations
|
|
45
|
+
*/
|
|
46
|
+
export const NODENS_PROMPT = `You are Nodens — god of craftsmanship, a frontend design specialization agent within oh-my-claudecode.
|
|
47
|
+
|
|
48
|
+
## DESIGN PHILOSOPHY
|
|
49
|
+
Your job is to help users craft beautiful, accessible, well-designed interfaces and components.
|
|
50
|
+
You follow a **Design-First Methodology**:
|
|
51
|
+
|
|
52
|
+
1. **Intent** — Clarify what the user wants to build and why. Ask clarifying questions.
|
|
53
|
+
- What's the purpose? Who's the user? What problem does it solve?
|
|
54
|
+
|
|
55
|
+
2. **Specification** — Define the design before code. Use words, not code yet.
|
|
56
|
+
- Layout structure, typography, colors, spacing, interactions, accessibility needs
|
|
57
|
+
- Create a visual/textual specification that the user approves
|
|
58
|
+
|
|
59
|
+
3. **Implementation** — Write clean, accessible code following the spec.
|
|
60
|
+
- Use semantic HTML, proper ARIA labels, keyboard navigation
|
|
61
|
+
- Follow WCAG 2.1 accessibility standards
|
|
62
|
+
- Use CSS Grid/Flexbox for layout, mobile-first responsive design
|
|
63
|
+
- Consider design tokens (colors, typography, spacing scales)
|
|
64
|
+
|
|
65
|
+
4. **Polish** — Refine the component.
|
|
66
|
+
- Add animations/transitions for better UX
|
|
67
|
+
- Test responsive behavior across breakpoints
|
|
68
|
+
- Verify accessibility with screen readers
|
|
69
|
+
- Optimize performance (lazy loading, code splitting)
|
|
70
|
+
|
|
71
|
+
## KEY PRINCIPLES
|
|
72
|
+
- **Accessibility First** — WCAG 2.1 AA standard minimum
|
|
73
|
+
- **Responsive by Default** — Mobile-first approach, test on small/medium/large screens
|
|
74
|
+
- **Design Tokens** — Use consistent spacing, colors, typography via tokens/CSS vars
|
|
75
|
+
- **Performance** — Optimize bundle size, avoid unnecessary re-renders
|
|
76
|
+
- **Documentation** — Document component API, usage examples, edge cases
|
|
77
|
+
- **Component Reusability** — Design for composition and reuse
|
|
78
|
+
|
|
79
|
+
## TOOLS
|
|
80
|
+
You have access to:
|
|
81
|
+
- Read/Write/Edit — For working with component files
|
|
82
|
+
- WebFetch — For design inspiration, documentation
|
|
83
|
+
- WebSearch — For latest UI/UX patterns, accessibility best practices
|
|
84
|
+
- Bash — For building, testing, previewing components
|
|
85
|
+
|
|
86
|
+
## WORKFLOW FOR DESIGN TASKS
|
|
87
|
+
1. Ask clarifying questions about intent (audience, purpose, constraints)
|
|
88
|
+
2. Propose a specification (layout, colors, typography, interactions)
|
|
89
|
+
3. Get approval before implementing
|
|
90
|
+
4. Write the component code (HTML, CSS, JavaScript/TypeScript)
|
|
91
|
+
5. Add accessibility features (ARIA, semantic HTML, keyboard nav)
|
|
92
|
+
6. Ensure responsive design (test at multiple breakpoints)
|
|
93
|
+
7. Document the component (API, examples, accessibility notes)
|
|
94
|
+
|
|
95
|
+
## WHEN TO DEFER
|
|
96
|
+
- Backend/API design → refer to Yog-Sothoth (architecture advisor)
|
|
97
|
+
- Rapid prototyping (low quality) → refer to Hastur (fast turnaround)
|
|
98
|
+
- Code review/quality → refer to Tsathoggua (quality reviewer)
|
|
99
|
+
- Search/exploration → refer to Dagon (search specialist)
|
|
100
|
+
|
|
101
|
+
Remember: Good design is invisible. Users shouldn't think about the interface — they should just use it.
|
|
102
|
+
Accessibility and performance are features, not afterthoughts.`;
|
|
103
|
+
/**
|
|
104
|
+
* Factory function to create Nodens agent configuration
|
|
105
|
+
*
|
|
106
|
+
* @param model - The Claude model to use for this agent
|
|
107
|
+
* @param availableAgents - List of available agents (for prompt context)
|
|
108
|
+
* @param availableToolNames - List of available tools (for tool config)
|
|
109
|
+
* @param availableSkills - List of available skills (for skill injection)
|
|
110
|
+
* @param availableCategories - List of available categories (for category context)
|
|
111
|
+
* @returns AgentConfig for Nodens
|
|
112
|
+
*/
|
|
113
|
+
export function createNodenAgent(model, availableAgents, availableToolNames, availableSkills, availableCategories) {
|
|
114
|
+
return {
|
|
115
|
+
name: "nodens",
|
|
116
|
+
description: "Nodens — God of Craftsmanship and Design. Guides users through design methodology: intent → spec → impl → polish",
|
|
117
|
+
mode: "subagent",
|
|
118
|
+
model,
|
|
119
|
+
temperature: 0.7, // Slightly creative for design
|
|
120
|
+
maxTokens: 16000,
|
|
121
|
+
prompt: NODENS_PROMPT,
|
|
122
|
+
color: "#FF6B35", // Warm orange for creative/design
|
|
123
|
+
tools: {
|
|
124
|
+
// Read/Write/Edit for working with files
|
|
125
|
+
Read: true,
|
|
126
|
+
Write: true,
|
|
127
|
+
Edit: true,
|
|
128
|
+
// Web tools for research and inspiration
|
|
129
|
+
WebFetch: true,
|
|
130
|
+
WebSearch: true,
|
|
131
|
+
// Bash for building/testing components
|
|
132
|
+
Bash: true,
|
|
133
|
+
// Disable expensive tools
|
|
134
|
+
"Claude API": false,
|
|
135
|
+
RemoteTrigger: false,
|
|
136
|
+
},
|
|
137
|
+
skills: ["frontend-acolyte"],
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Export metadata for registration in AGENT_METADATA_MAP
|
|
142
|
+
*/
|
|
143
|
+
export const NODENS_AGENT_METADATA = {
|
|
144
|
+
metadata: NODENS_PROMPT_METADATA,
|
|
145
|
+
factory: createNodenAgent,
|
|
146
|
+
};
|
|
147
|
+
//# sourceMappingURL=nodens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nodens.js","sourceRoot":"","sources":["../../src/agents/nodens.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAwB;IACzD,QAAQ,EAAE,SAAS;IACnB,IAAI,EAAE,UAAU;IAChB,WAAW,EAAE,QAAQ;IACrB,UAAU,EAAE,4DAA4D;IACxE,OAAO,EAAE;QACP,0CAA0C;QAC1C,4DAA4D;QAC5D,2DAA2D;QAC3D,2DAA2D;QAC3D,8DAA8D;KAC/D;IACD,SAAS,EAAE;QACT,mDAAmD;QACnD,mEAAmE;QACnE,0CAA0C;KAC3C;IACD,QAAQ,EAAE;QACR,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,6CAA6C,EAAE;QAC/E,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,wCAAwC,EAAE;QACnE,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,sCAAsC,EAAE;QACxE,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,6CAA6C,EAAE;QAC1E,EAAE,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,8CAA8C,EAAE;QACjF,EAAE,MAAM,EAAE,eAAe,EAAE,OAAO,EAAE,uCAAuC,EAAE;KAC9E;CACF,CAAA;AAED;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+DAwDkC,CAAA;AAE/D;;;;;;;;;GASG;AACH,MAAM,UAAU,gBAAgB,CAC9B,KAAa,EACb,eAAkC,EAClC,kBAA6B,EAC7B,eAAkC,EAClC,mBAAyC;IAEzC,OAAO;QACL,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,kHAAkH;QAC/H,IAAI,EAAE,UAAU;QAChB,KAAK;QACL,WAAW,EAAE,GAAG,EAAE,+BAA+B;QACjD,SAAS,EAAE,KAAK;QAChB,MAAM,EAAE,aAAa;QACrB,KAAK,EAAE,SAAS,EAAE,kCAAkC;QACpD,KAAK,EAAE;YACL,yCAAyC;YACzC,IAAI,EAAE,IAAI;YACV,KAAK,EAAE,IAAI;YACX,IAAI,EAAE,IAAI;YAEV,yCAAyC;YACzC,QAAQ,EAAE,IAAI;YACd,SAAS,EAAE,IAAI;YAEf,uCAAuC;YACvC,IAAI,EAAE,IAAI;YAEV,0BAA0B;YAC1B,YAAY,EAAE,KAAK;YACnB,aAAa,EAAE,KAAK;SACrB;QACD,MAAM,EAAE,CAAC,kBAAkB,CAAC;KAC7B,CAAA;AACH,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,QAAQ,EAAE,sBAAsB;IAChC,OAAO,EAAE,gBAAgB;CAC1B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shoggoth.d.ts","sourceRoot":"","sources":["../../src/agents/shoggoth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAa,mBAAmB,EAAE,MAAM,YAAY,CAAA;AAI7E;;;;;;;;GAQG;AAEH,eAAO,MAAM,wBAAwB,EAAE,mBAmBtC,CAAA;
|
|
1
|
+
{"version":3,"file":"shoggoth.d.ts","sourceRoot":"","sources":["../../src/agents/shoggoth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAa,mBAAmB,EAAE,MAAM,YAAY,CAAA;AAI7E;;;;;;;;GAQG;AAEH,eAAO,MAAM,wBAAwB,EAAE,mBAmBtC,CAAA;AAuFD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,WAAW,CAgB9D;yBAhBe,mBAAmB"}
|
package/dist/agents/shoggoth.js
CHANGED
|
@@ -101,7 +101,17 @@ Use the right tool for the job:
|
|
|
101
101
|
- **File patterns** (find by name/extension): Glob
|
|
102
102
|
- **History/evolution** (when added, who changed): git commands via Bash
|
|
103
103
|
|
|
104
|
-
Flood with parallel calls. Cross-validate findings across multiple tools
|
|
104
|
+
Flood with parallel calls. Cross-validate findings across multiple tools.
|
|
105
|
+
|
|
106
|
+
## WEB RESEARCH ENFORCEMENT (Phase 2)
|
|
107
|
+
|
|
108
|
+
For codebase searches that involve external libraries or frameworks:
|
|
109
|
+
- If version numbers are mentioned, verify current versions
|
|
110
|
+
- If library names are mentioned, check if they're still maintained
|
|
111
|
+
- Use WebSearch to validate library status or compatibility info
|
|
112
|
+
- Report findings with citations to current docs
|
|
113
|
+
|
|
114
|
+
Your searches are comprehensive — extend that to external context when relevant.`;
|
|
105
115
|
export function createShoggothAgent(model) {
|
|
106
116
|
return {
|
|
107
117
|
name: "shoggoth",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shoggoth.js","sourceRoot":"","sources":["../../src/agents/shoggoth.ts"],"names":[],"mappings":"AAEA,MAAM,IAAI,GAAc,UAAU,CAAA;AAElC;;;;;;;;GAQG;AAEH,MAAM,CAAC,MAAM,wBAAwB,GAAwB;IAC3D,QAAQ,EAAE,aAAa;IACvB,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,UAAU;IACvB,UAAU,EAAE,kDAAkD;IAC9D,QAAQ,EAAE;QACR,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,uDAAuD,EAAE;KACzF;IACD,OAAO,EAAE;QACP,+BAA+B;QAC/B,6BAA6B;QAC7B,+BAA+B;QAC/B,yBAAyB;KAC1B;IACD,SAAS,EAAE;QACT,iCAAiC;QACjC,iCAAiC;QACjC,qBAAqB;KACtB;CACF,CAAA;AAED,MAAM,eAAe,GAAG
|
|
1
|
+
{"version":3,"file":"shoggoth.js","sourceRoot":"","sources":["../../src/agents/shoggoth.ts"],"names":[],"mappings":"AAEA,MAAM,IAAI,GAAc,UAAU,CAAA;AAElC;;;;;;;;GAQG;AAEH,MAAM,CAAC,MAAM,wBAAwB,GAAwB;IAC3D,QAAQ,EAAE,aAAa;IACvB,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,UAAU;IACvB,UAAU,EAAE,kDAAkD;IAC9D,QAAQ,EAAE;QACR,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,uDAAuD,EAAE;KACzF;IACD,OAAO,EAAE;QACP,+BAA+B;QAC/B,6BAA6B;QAC7B,+BAA+B;QAC/B,yBAAyB;KAC1B;IACD,SAAS,EAAE;QACT,iCAAiC;QACjC,iCAAiC;QACjC,qBAAqB;KACtB;CACF,CAAA;AAED,MAAM,eAAe,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iFAmFyD,CAAA;AAEjF,MAAM,UAAU,mBAAmB,CAAC,KAAa;IAC/C,OAAO;QACL,IAAI,EAAE,UAAU;QAChB,WAAW,EACT,iTAAiT;QACnT,IAAI,EAAE,IAAI;QACV,KAAK;QACL,WAAW,EAAE,GAAG;QAChB,MAAM,EAAE,eAAe;QACvB,KAAK,EAAE,SAAS;QAChB,KAAK,EAAE;YACL,KAAK,EAAE,KAAK;YACZ,IAAI,EAAE,KAAK;YACX,KAAK,EAAE,KAAK;SACb;KACF,CAAA;AACH,CAAC;AACD,mBAAmB,CAAC,IAAI,GAAG,IAAI,CAAA"}
|
package/dist/cli/bind.d.ts
CHANGED
|
@@ -24,6 +24,14 @@ import { TuiWriter } from "./tui.js";
|
|
|
24
24
|
export interface BindContext {
|
|
25
25
|
archive: YithArchiveHandle;
|
|
26
26
|
tui: TuiWriter;
|
|
27
|
+
/**
|
|
28
|
+
* Absolute project cwd to scope work to, when the caller wants a
|
|
29
|
+
* narrow run. Set by the Stop-hook capture path so each assistant-
|
|
30
|
+
* response tick only scans the current session's project's
|
|
31
|
+
* transcripts rather than every project under `~/.claude/projects/`.
|
|
32
|
+
* Undefined means "all projects" (the full bind default).
|
|
33
|
+
*/
|
|
34
|
+
projectCwd?: string;
|
|
27
35
|
}
|
|
28
36
|
export interface PhaseRunner {
|
|
29
37
|
name: BindPhase;
|
|
@@ -52,6 +60,22 @@ export interface RunBindOptions {
|
|
|
52
60
|
* phase without touching the others. Default: respect bindState.
|
|
53
61
|
*/
|
|
54
62
|
force?: BindPhase[];
|
|
63
|
+
/**
|
|
64
|
+
* Narrow the runner to a specific subset of phases. Phases NOT in
|
|
65
|
+
* this list are neither run nor marked complete — their bindState
|
|
66
|
+
* stays untouched so the next full `bind` invocation still treats
|
|
67
|
+
* them as pending. Used by `--claude-only` / `--compress-only`
|
|
68
|
+
* flags and by the Stop hook to run a fast tick without re-doing
|
|
69
|
+
* unrelated work.
|
|
70
|
+
*/
|
|
71
|
+
onlyPhases?: BindPhase[];
|
|
72
|
+
/**
|
|
73
|
+
* Absolute project cwd to pass through to phase runners via
|
|
74
|
+
* `BindContext.projectCwd`. The default `claude_transcripts`
|
|
75
|
+
* runner uses this to scope transcript ingestion to one project
|
|
76
|
+
* instead of scanning every `~/.claude/projects/` subdir.
|
|
77
|
+
*/
|
|
78
|
+
projectCwd?: string;
|
|
55
79
|
}
|
|
56
80
|
/**
|
|
57
81
|
* State-machine driver. Reads bindState, runs pending phases in order,
|
package/dist/cli/bind.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bind.d.ts","sourceRoot":"","sources":["../../src/cli/bind.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAMH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAA;AAO1E,OAAO,EAKL,KAAK,SAAS,EACd,KAAK,SAAS,EAC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