@pennyfarthing/cyclist 10.3.1 → 11.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/agent-load.d.ts +1 -2
- package/dist/api/agent-load.d.ts.map +1 -1
- package/dist/api/agent-load.js +2 -123
- package/dist/api/agent-load.js.map +1 -1
- package/dist/api/audit-log.d.ts +1 -17
- package/dist/api/audit-log.d.ts.map +1 -1
- package/dist/api/audit-log.js +2 -162
- package/dist/api/audit-log.js.map +1 -1
- package/dist/api/background-tasks.d.ts +1 -26
- package/dist/api/background-tasks.d.ts.map +1 -1
- package/dist/api/background-tasks.js +2 -55
- package/dist/api/background-tasks.js.map +1 -1
- package/dist/api/bell.d.ts +1 -18
- package/dist/api/bell.d.ts.map +1 -1
- package/dist/api/bell.js +2 -33
- package/dist/api/bell.js.map +1 -1
- package/dist/api/code-markers.d.ts +1 -8
- package/dist/api/code-markers.d.ts.map +1 -1
- package/dist/api/code-markers.js +2 -61
- package/dist/api/code-markers.js.map +1 -1
- package/dist/api/complexity.d.ts +1 -2
- package/dist/api/complexity.d.ts.map +1 -1
- package/dist/api/complexity.js +2 -46
- package/dist/api/complexity.js.map +1 -1
- package/dist/api/context.d.ts +1 -37
- package/dist/api/context.d.ts.map +1 -1
- package/dist/api/context.js +2 -143
- package/dist/api/context.js.map +1 -1
- package/dist/api/dead-code.d.ts +1 -2
- package/dist/api/dead-code.d.ts.map +1 -1
- package/dist/api/dead-code.js +2 -69
- package/dist/api/dead-code.js.map +1 -1
- package/dist/api/dependencies.d.ts +1 -2
- package/dist/api/dependencies.d.ts.map +1 -1
- package/dist/api/dependencies.js +2 -42
- package/dist/api/dependencies.js.map +1 -1
- package/dist/api/evaluation.d.ts +1 -19
- package/dist/api/evaluation.d.ts.map +1 -1
- package/dist/api/evaluation.js +2 -127
- package/dist/api/evaluation.js.map +1 -1
- package/dist/api/file-browser.d.ts +1 -8
- package/dist/api/file-browser.d.ts.map +1 -1
- package/dist/api/file-browser.js +2 -114
- package/dist/api/file-browser.js.map +1 -1
- package/dist/api/git.d.ts +1 -46
- package/dist/api/git.d.ts.map +1 -1
- package/dist/api/git.js +2 -354
- package/dist/api/git.js.map +1 -1
- package/dist/api/health-score.d.ts +1 -2
- package/dist/api/health-score.d.ts.map +1 -1
- package/dist/api/health-score.js +2 -46
- package/dist/api/health-score.js.map +1 -1
- package/dist/api/hook-request.d.ts +1 -40
- package/dist/api/hook-request.d.ts.map +1 -1
- package/dist/api/hook-request.js +2 -277
- package/dist/api/hook-request.js.map +1 -1
- package/dist/api/hotspots.d.ts +1 -2
- package/dist/api/hotspots.d.ts.map +1 -1
- package/dist/api/hotspots.js +2 -61
- package/dist/api/hotspots.js.map +1 -1
- package/dist/api/identity.d.ts +1 -16
- package/dist/api/identity.d.ts.map +1 -1
- package/dist/api/identity.js +2 -78
- package/dist/api/identity.js.map +1 -1
- package/dist/api/index.d.ts +1 -34
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +2 -44
- package/dist/api/index.js.map +1 -1
- package/dist/api/mode.d.ts +1 -22
- package/dist/api/mode.d.ts.map +1 -1
- package/dist/api/mode.js +2 -37
- package/dist/api/mode.js.map +1 -1
- package/dist/api/otlp.d.ts +1 -2
- package/dist/api/otlp.d.ts.map +1 -1
- package/dist/api/otlp.js +2 -46
- package/dist/api/otlp.js.map +1 -1
- package/dist/api/permissions.d.ts +1 -15
- package/dist/api/permissions.d.ts.map +1 -1
- package/dist/api/permissions.js +2 -66
- package/dist/api/permissions.js.map +1 -1
- package/dist/api/persona.d.ts +1 -8
- package/dist/api/persona.d.ts.map +1 -1
- package/dist/api/persona.js +2 -67
- package/dist/api/persona.js.map +1 -1
- package/dist/api/portrait.d.ts +1 -5
- package/dist/api/portrait.d.ts.map +1 -1
- package/dist/api/portrait.js +2 -27
- package/dist/api/portrait.js.map +1 -1
- package/dist/api/settings.d.ts +1 -53
- package/dist/api/settings.d.ts.map +1 -1
- package/dist/api/settings.js +2 -464
- package/dist/api/settings.js.map +1 -1
- package/dist/api/spans.d.ts +1 -16
- package/dist/api/spans.d.ts.map +1 -1
- package/dist/api/spans.js +2 -244
- package/dist/api/spans.js.map +1 -1
- package/dist/api/stats.d.ts +1 -12
- package/dist/api/stats.d.ts.map +1 -1
- package/dist/api/stats.js +2 -84
- package/dist/api/stats.js.map +1 -1
- package/dist/api/story.d.ts +1 -2
- package/dist/api/story.d.ts.map +1 -1
- package/dist/api/story.js +2 -14
- package/dist/api/story.js.map +1 -1
- package/dist/api/telemetry.d.ts +1 -18
- package/dist/api/telemetry.d.ts.map +1 -1
- package/dist/api/telemetry.js +2 -164
- package/dist/api/telemetry.js.map +1 -1
- package/dist/api/theme-agents.d.ts +1 -60
- package/dist/api/theme-agents.d.ts.map +1 -1
- package/dist/api/theme-agents.js +2 -213
- package/dist/api/theme-agents.js.map +1 -1
- package/dist/api/todos.d.ts +1 -32
- package/dist/api/todos.d.ts.map +1 -1
- package/dist/api/todos.js +2 -43
- package/dist/api/todos.js.map +1 -1
- package/dist/api/token-stats.d.ts +1 -7
- package/dist/api/token-stats.d.ts.map +1 -1
- package/dist/api/token-stats.js +2 -35
- package/dist/api/token-stats.js.map +1 -1
- package/dist/api/welcome.d.ts +1 -21
- package/dist/api/welcome.d.ts.map +1 -1
- package/dist/api/welcome.js +2 -34
- package/dist/api/welcome.js.map +1 -1
- package/dist/env.d.ts +6 -0
- package/dist/env.d.ts.map +1 -0
- package/dist/env.js +10 -0
- package/dist/env.js.map +1 -0
- package/dist/focus.d.ts +53 -0
- package/dist/focus.d.ts.map +1 -0
- package/dist/focus.js +122 -0
- package/dist/focus.js.map +1 -0
- package/dist/menu-builder.d.ts.map +1 -1
- package/dist/menu-builder.js +0 -1
- package/dist/menu-builder.js.map +1 -1
- package/dist/public/css/react.css +1 -1
- package/dist/public/js/react/react.js +51 -59
- package/dist/server.d.ts +16 -85
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +38 -409
- package/dist/server.js.map +1 -1
- package/dist/sprint-data.d.ts +1 -1
- package/dist/sprint-data.d.ts.map +1 -1
- package/dist/sprint-data.js +29 -8
- package/dist/sprint-data.js.map +1 -1
- package/dist/websocket.d.ts +2 -0
- package/dist/websocket.d.ts.map +1 -1
- package/dist/websocket.js +45 -78
- package/dist/websocket.js.map +1 -1
- package/package.json +33 -35
- package/portraits/hogans-heroes/large/burkhalter-35312.png +0 -0
- package/portraits/hogans-heroes/large/carter-34352.png +0 -0
- package/portraits/hogans-heroes/large/hochstetter-45314.png +0 -0
- package/portraits/hogans-heroes/large/hogan-44541.png +0 -0
- package/portraits/hogans-heroes/large/kinch-35241.png +0 -0
- package/portraits/hogans-heroes/large/klink-23434.png +0 -0
- package/portraits/hogans-heroes/large/lebeau-45443.png +0 -0
- package/portraits/hogans-heroes/large/marya-53543.png +0 -0
- package/portraits/hogans-heroes/large/newkirk-54432.png +0 -0
- package/portraits/hogans-heroes/large/schultz-42453.png +0 -0
- package/portraits/hogans-heroes/large/underground-55131.png +0 -0
- package/portraits/hogans-heroes/medium/burkhalter-35312.png +0 -0
- package/portraits/hogans-heroes/medium/carter-34352.png +0 -0
- package/portraits/hogans-heroes/medium/hochstetter-45314.png +0 -0
- package/portraits/hogans-heroes/medium/hogan-44541.png +0 -0
- package/portraits/hogans-heroes/medium/kinch-35241.png +0 -0
- package/portraits/hogans-heroes/medium/klink-23434.png +0 -0
- package/portraits/hogans-heroes/medium/lebeau-45443.png +0 -0
- package/portraits/hogans-heroes/medium/marya-53543.png +0 -0
- package/portraits/hogans-heroes/medium/newkirk-54432.png +0 -0
- package/portraits/hogans-heroes/medium/schultz-42453.png +0 -0
- package/portraits/hogans-heroes/medium/underground-55131.png +0 -0
- package/portraits/monty-python/large/announcer-44441.png +0 -0
- package/portraits/monty-python/large/arguer-35412.png +0 -0
- package/portraits/monty-python/large/bicycle-repair-man-35241.png +0 -0
- package/portraits/monty-python/large/colonel-35423.png +0 -0
- package/portraits/monty-python/large/counsellor-45341.png +0 -0
- package/portraits/monty-python/large/gumbys-23524.png +0 -0
- package/portraits/monty-python/large/nudge-43533.png +0 -0
- package/portraits/monty-python/large/praline-45413.png +0 -0
- package/portraits/monty-python/large/silly-walks-55322.png +0 -0
- package/portraits/monty-python/large/wensleydale-54451.png +0 -0
- package/portraits/monty-python/large/xim-nez-43534.png +0 -0
- package/portraits/monty-python/medium/announcer-44441.png +0 -0
- package/portraits/monty-python/medium/arguer-35412.png +0 -0
- package/portraits/monty-python/medium/bicycle-repair-man-35241.png +0 -0
- package/portraits/monty-python/medium/colonel-35423.png +0 -0
- package/portraits/monty-python/medium/counsellor-45341.png +0 -0
- package/portraits/monty-python/medium/gumbys-23524.png +0 -0
- package/portraits/monty-python/medium/nudge-43533.png +0 -0
- package/portraits/monty-python/medium/praline-45413.png +0 -0
- package/portraits/monty-python/medium/silly-walks-55322.png +0 -0
- package/portraits/monty-python/medium/wensleydale-54451.png +0 -0
- package/portraits/monty-python/medium/xim-nez-43534.png +0 -0
- package/portraits/stephen-king/large/andy-55231.png +0 -0
- package/portraits/stephen-king/large/christine-25112.png +0 -0
- package/portraits/stephen-king/large/danny-53243.png +0 -0
- package/portraits/stephen-king/large/flagg-55311.png +0 -0
- package/portraits/stephen-king/large/gaunt-54421.png +0 -0
- package/portraits/stephen-king/large/jack-44224.png +0 -0
- package/portraits/stephen-king/large/johnny-44353.png +0 -0
- package/portraits/stephen-king/large/margaret-15415.png +0 -0
- package/portraits/stephen-king/large/paul-45233.png +0 -0
- package/portraits/stephen-king/large/pennywise-54411.png +0 -0
- package/portraits/stephen-king/large/roland-35121.png +0 -0
- package/portraits/stephen-king/medium/andy-55231.png +0 -0
- package/portraits/stephen-king/medium/christine-25112.png +0 -0
- package/portraits/stephen-king/medium/danny-53243.png +0 -0
- package/portraits/stephen-king/medium/flagg-55311.png +0 -0
- package/portraits/stephen-king/medium/gaunt-54421.png +0 -0
- package/portraits/stephen-king/medium/jack-44224.png +0 -0
- package/portraits/stephen-king/medium/johnny-44353.png +0 -0
- package/portraits/stephen-king/medium/margaret-15415.png +0 -0
- package/portraits/stephen-king/medium/paul-45233.png +0 -0
- package/portraits/stephen-king/medium/pennywise-54411.png +0 -0
- package/portraits/stephen-king/medium/roland-35121.png +0 -0
- package/src/public/App.tsx +21 -5
- package/src/public/components/BikeRackIndex.tsx +0 -1
- package/src/public/components/BikeRackWorkspace.tsx +86 -11
- package/src/public/components/DockviewWorkspace.tsx +19 -8
- package/src/public/components/StandalonePanel.tsx +1 -3
- package/src/public/components/panel-registry.ts +3 -1
- package/src/public/components/panels/AuditLogPanel.tsx +28 -4
- package/src/public/components/panels/GitPanel.tsx +1 -20
- package/src/public/components/panels/SettingsPanel.tsx +0 -1
- package/src/public/components/panels/SprintPanel.tsx +32 -1
- package/src/public/components/panels/index.ts +0 -2
- package/src/public/hooks/useFocusPanel.ts +137 -0
- package/src/public/hooks/useLayoutPersistence.ts +8 -5
- package/src/public/styles/dockview-theme.css +1 -84
- package/src/public/styles/tailwind.css +27 -32
- package/src/public/utils/slash-commands.ts +122 -98
- package/LICENSE +0 -14
- package/dist/hooks/cyclist-pretooluse-hook.d.ts +0 -60
- package/dist/hooks/cyclist-pretooluse-hook.d.ts.map +0 -1
- package/dist/hooks/cyclist-pretooluse-hook.js +0 -57
- package/dist/hooks/cyclist-pretooluse-hook.js.map +0 -1
- package/dist/hooks/pretooluse-hook.d.ts +0 -89
- package/dist/hooks/pretooluse-hook.d.ts.map +0 -1
- package/dist/hooks/pretooluse-hook.js +0 -235
- package/dist/hooks/pretooluse-hook.js.map +0 -1
- package/dist/notification-sound.d.ts +0 -59
- package/dist/notification-sound.d.ts.map +0 -1
- package/dist/notification-sound.js +0 -219
- package/dist/notification-sound.js.map +0 -1
- package/dist/plugin-loader.test.d.ts +0 -17
- package/dist/plugin-loader.test.d.ts.map +0 -1
- package/dist/plugin-loader.test.js +0 -407
- package/dist/plugin-loader.test.js.map +0 -1
- package/portraits/star-trek-tng/large/beverly-44352.png +0 -0
- package/portraits/star-trek-tng/large/data-55241.png +0 -0
- package/portraits/star-trek-tng/large/deanna-43353.png +0 -0
- package/portraits/star-trek-tng/large/geordi-54342.png +0 -0
- package/portraits/star-trek-tng/large/jean-luc-45342.png +0 -0
- package/portraits/star-trek-tng/large/kathryn-45332.png +0 -0
- package/portraits/star-trek-tng/large/miles-35342.png +0 -0
- package/portraits/star-trek-tng/large/q-53521.png +0 -0
- package/portraits/star-trek-tng/large/spock-45231.png +0 -0
- package/portraits/star-trek-tng/large/troi-44352.png +0 -0
- package/portraits/star-trek-tng/medium/beverly-44352.png +0 -0
- package/portraits/star-trek-tng/medium/data-55241.png +0 -0
- package/portraits/star-trek-tng/medium/deanna-43353.png +0 -0
- package/portraits/star-trek-tng/medium/geordi-54342.png +0 -0
- package/portraits/star-trek-tng/medium/jean-luc-45342.png +0 -0
- package/portraits/star-trek-tng/medium/kathryn-45332.png +0 -0
- package/portraits/star-trek-tng/medium/miles-35342.png +0 -0
- package/portraits/star-trek-tng/medium/q-53521.png +0 -0
- package/portraits/star-trek-tng/medium/spock-45231.png +0 -0
- package/portraits/star-trek-tng/medium/troi-44352.png +0 -0
- package/src/public/components/panels/TTYPanel.tsx +0 -299
- package/src/public/types/electron.d.ts +0 -18
|
@@ -1,61 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* Agent character mapping from theme
|
|
4
|
-
*/
|
|
5
|
-
export interface AgentCharacterMap {
|
|
6
|
-
[role: string]: {
|
|
7
|
-
character: string;
|
|
8
|
-
shortName?: string;
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* MSSCI-12403: Enhanced agent data for persona popup team roster
|
|
13
|
-
*/
|
|
14
|
-
export interface EnhancedThemeAgent {
|
|
15
|
-
role: string;
|
|
16
|
-
character: string;
|
|
17
|
-
shortName?: string;
|
|
18
|
-
style: string;
|
|
19
|
-
background: string;
|
|
20
|
-
quirks: string[];
|
|
21
|
-
slug: string;
|
|
22
|
-
lift?: number;
|
|
23
|
-
ocean?: {
|
|
24
|
-
O: number;
|
|
25
|
-
C: number;
|
|
26
|
-
E: number;
|
|
27
|
-
A: number;
|
|
28
|
-
N: number;
|
|
29
|
-
};
|
|
30
|
-
helper?: {
|
|
31
|
-
name: string;
|
|
32
|
-
style: string;
|
|
33
|
-
plural?: boolean;
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* MSSCI-12403: Full theme data including tier and all agents
|
|
38
|
-
*/
|
|
39
|
-
export interface EnhancedThemeData {
|
|
40
|
-
theme: string;
|
|
41
|
-
themeName: string;
|
|
42
|
-
tier: 'S' | 'A' | 'B' | 'C' | null;
|
|
43
|
-
agents: EnhancedThemeAgent[];
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Get all agent-to-character mappings from current theme
|
|
47
|
-
* @param projectDir - The project directory
|
|
48
|
-
* @returns Map of role -> character data
|
|
49
|
-
*/
|
|
50
|
-
export declare function getThemeAgents(projectDir: string): AgentCharacterMap | null;
|
|
51
|
-
/**
|
|
52
|
-
* MSSCI-12403: Get enhanced theme data with full agent details for persona popup
|
|
53
|
-
* @param projectDir - The project directory
|
|
54
|
-
* @returns Full theme data including tier and detailed agent info
|
|
55
|
-
*/
|
|
56
|
-
export declare function getEnhancedThemeData(projectDir: string): EnhancedThemeData | null;
|
|
57
|
-
/**
|
|
58
|
-
* Create theme agents API router
|
|
59
|
-
*/
|
|
60
|
-
export declare function createThemeAgentsRouter(getProjectDir: () => string): Router;
|
|
1
|
+
export * from '@pennyfarthing/core/dist/server/api/theme-agents.js';
|
|
61
2
|
//# sourceMappingURL=theme-agents.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme-agents.d.ts","sourceRoot":"","sources":["../../src/api/theme-agents.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"theme-agents.d.ts","sourceRoot":"","sources":["../../src/api/theme-agents.ts"],"names":[],"mappings":"AACA,cAAc,qDAAqD,CAAC"}
|
package/dist/api/theme-agents.js
CHANGED
|
@@ -1,214 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { join, dirname } from 'path';
|
|
4
|
-
import { fileURLToPath } from 'url';
|
|
5
|
-
import { parse as parseYaml } from 'yaml';
|
|
6
|
-
import { detectPennyfarthingProject, loadThemeConfig, loadThemeYaml } from '../pennyfarthing.js';
|
|
7
|
-
// ESM-compatible __dirname equivalent
|
|
8
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
9
|
-
const __dirname = dirname(__filename);
|
|
10
|
-
const CYCLIST_ROOT = join(__dirname, '..', '..', '..', '..'); // packages/cyclist/src/api -> pennyfarthing-2
|
|
11
|
-
/**
|
|
12
|
-
* Convert a name to a URL-safe slug (lowercase kebab-case)
|
|
13
|
-
*/
|
|
14
|
-
function toSlug(name) {
|
|
15
|
-
return name
|
|
16
|
-
.toLowerCase()
|
|
17
|
-
.replace(/[^a-z0-9]+/g, '-')
|
|
18
|
-
.replace(/^-|-$/g, '');
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Generate OCEAN suffix from scores (e.g., "54432")
|
|
22
|
-
*/
|
|
23
|
-
function oceanSuffix(ocean) {
|
|
24
|
-
return `${ocean.O}${ocean.C}${ocean.E}${ocean.A}${ocean.N}`;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Generate character slug from shortName and OCEAN scores
|
|
28
|
-
*/
|
|
29
|
-
function generateSlug(shortName, ocean) {
|
|
30
|
-
const baseSlug = toSlug(shortName);
|
|
31
|
-
return `${baseSlug}-${oceanSuffix(ocean)}`;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Humanize a slug/kebab-case string to title case
|
|
35
|
-
*/
|
|
36
|
-
function humanize(str) {
|
|
37
|
-
if (!str)
|
|
38
|
-
return '';
|
|
39
|
-
const smallWords = ['of', 'the', 'a', 'an', 'and', 'or', 'but', 'in', 'on', 'at', 'to', 'for'];
|
|
40
|
-
return str
|
|
41
|
-
.split('-')
|
|
42
|
-
.map((word, index) => {
|
|
43
|
-
const lower = word.toLowerCase();
|
|
44
|
-
if (index === 0 || !smallWords.includes(lower)) {
|
|
45
|
-
return word.charAt(0).toUpperCase() + word.slice(1).toLowerCase();
|
|
46
|
-
}
|
|
47
|
-
return lower;
|
|
48
|
-
})
|
|
49
|
-
.join(' ');
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Find theme file path checking multiple locations
|
|
53
|
-
*/
|
|
54
|
-
function findThemePath(projectDir, themeName) {
|
|
55
|
-
const possiblePaths = [];
|
|
56
|
-
// 1. Packaged Electron app: Contents/Resources/pennyfarthing-dist/personas/themes
|
|
57
|
-
if (process.resourcesPath) {
|
|
58
|
-
possiblePaths.push(join(process.resourcesPath, 'pennyfarthing-dist', 'personas', 'themes', `${themeName}.yaml`));
|
|
59
|
-
}
|
|
60
|
-
// 2. Runtime via symlinks: .pennyfarthing/personas/themes (orchestrator pattern)
|
|
61
|
-
possiblePaths.push(join(projectDir, '.pennyfarthing', 'personas', 'themes', `${themeName}.yaml`));
|
|
62
|
-
// 3. Development mode: relative to cyclist package (pennyfarthing-2/pennyfarthing-dist)
|
|
63
|
-
possiblePaths.push(join(CYCLIST_ROOT, 'pennyfarthing-dist', 'personas', 'themes', `${themeName}.yaml`));
|
|
64
|
-
// 4. Legacy and fallback project directory paths
|
|
65
|
-
possiblePaths.push(join(projectDir, '.claude', 'personas', 'themes', `${themeName}.yaml`), join(projectDir, '.claude', 'pennyfarthing', 'themes', `${themeName}.yaml`), join(projectDir, 'pennyfarthing-dist', 'personas', 'themes', `${themeName}.yaml`), join(projectDir, 'node_modules', '@pennyfarthing', 'core', 'pennyfarthing-dist', 'personas', 'themes', `${themeName}.yaml`));
|
|
66
|
-
for (const path of possiblePaths) {
|
|
67
|
-
if (existsSync(path)) {
|
|
68
|
-
return path;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
return null;
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* Get all agent-to-character mappings from current theme
|
|
75
|
-
* @param projectDir - The project directory
|
|
76
|
-
* @returns Map of role -> character data
|
|
77
|
-
*/
|
|
78
|
-
export function getThemeAgents(projectDir) {
|
|
79
|
-
if (!detectPennyfarthingProject(projectDir)) {
|
|
80
|
-
return null;
|
|
81
|
-
}
|
|
82
|
-
const config = loadThemeConfig(projectDir);
|
|
83
|
-
if (!config) {
|
|
84
|
-
return null;
|
|
85
|
-
}
|
|
86
|
-
const themePath = findThemePath(projectDir, config.theme);
|
|
87
|
-
if (!themePath) {
|
|
88
|
-
return null;
|
|
89
|
-
}
|
|
90
|
-
const agents = loadThemeYaml(themePath);
|
|
91
|
-
if (!agents) {
|
|
92
|
-
return null;
|
|
93
|
-
}
|
|
94
|
-
// Build mapping of role -> character info
|
|
95
|
-
const result = {};
|
|
96
|
-
for (const [role, persona] of Object.entries(agents)) {
|
|
97
|
-
result[role] = {
|
|
98
|
-
character: persona.character,
|
|
99
|
-
shortName: persona.shortName,
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
return result;
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* MSSCI-12403: Get enhanced theme data with full agent details for persona popup
|
|
106
|
-
* @param projectDir - The project directory
|
|
107
|
-
* @returns Full theme data including tier and detailed agent info
|
|
108
|
-
*/
|
|
109
|
-
export function getEnhancedThemeData(projectDir) {
|
|
110
|
-
if (!detectPennyfarthingProject(projectDir)) {
|
|
111
|
-
return null;
|
|
112
|
-
}
|
|
113
|
-
const config = loadThemeConfig(projectDir);
|
|
114
|
-
if (!config) {
|
|
115
|
-
return null;
|
|
116
|
-
}
|
|
117
|
-
const themePath = findThemePath(projectDir, config.theme);
|
|
118
|
-
if (!themePath) {
|
|
119
|
-
return null;
|
|
120
|
-
}
|
|
121
|
-
// Load full theme YAML
|
|
122
|
-
let themeData;
|
|
123
|
-
try {
|
|
124
|
-
const content = readFileSync(themePath, 'utf-8');
|
|
125
|
-
themeData = parseYaml(content);
|
|
126
|
-
}
|
|
127
|
-
catch {
|
|
128
|
-
return null;
|
|
129
|
-
}
|
|
130
|
-
const themeMetadata = themeData.theme;
|
|
131
|
-
const agents = themeData.agents;
|
|
132
|
-
if (!agents) {
|
|
133
|
-
return null;
|
|
134
|
-
}
|
|
135
|
-
// Extract theme-level metadata
|
|
136
|
-
const tier = themeMetadata?.tier || null;
|
|
137
|
-
const themeName = themeMetadata?.name || humanize(config.theme);
|
|
138
|
-
// Build enhanced agent list
|
|
139
|
-
const enhancedAgents = [];
|
|
140
|
-
for (const [role, rawAgent] of Object.entries(agents)) {
|
|
141
|
-
const character = rawAgent.character;
|
|
142
|
-
const shortName = rawAgent.shortName || character.split(' ')[0];
|
|
143
|
-
const style = rawAgent.style || '';
|
|
144
|
-
const background = rawAgent.role || ''; // 'role' in theme YAML is character background
|
|
145
|
-
const quirks = rawAgent.quirks || [];
|
|
146
|
-
const ocean = rawAgent.ocean;
|
|
147
|
-
const rawHelper = rawAgent.helper;
|
|
148
|
-
const helper = rawHelper?.name ? { name: rawHelper.name, style: rawHelper.style || '', ...(rawHelper.plural ? { plural: true } : {}) } : undefined;
|
|
149
|
-
// Generate portrait slug
|
|
150
|
-
const slug = ocean ? generateSlug(shortName, ocean) : role;
|
|
151
|
-
// Extract lift from YAML comments (stored in special field if present)
|
|
152
|
-
// For now, we'll parse from the YAML comment pattern "JOB FAIR OPTIMIZED: ... (+X.X over ...)"
|
|
153
|
-
// This would need the raw YAML to parse, so we'll leave as undefined for now
|
|
154
|
-
// TODO: Add lift field to theme YAML schema
|
|
155
|
-
const lift = undefined;
|
|
156
|
-
enhancedAgents.push({
|
|
157
|
-
role,
|
|
158
|
-
character,
|
|
159
|
-
shortName,
|
|
160
|
-
style,
|
|
161
|
-
background,
|
|
162
|
-
quirks,
|
|
163
|
-
slug,
|
|
164
|
-
lift,
|
|
165
|
-
ocean,
|
|
166
|
-
helper,
|
|
167
|
-
});
|
|
168
|
-
}
|
|
169
|
-
// Sort agents by a consistent order (orchestrator, sm, tea, dev, reviewer, architect, pm, tech-writer, ux-designer, devops, ba)
|
|
170
|
-
const roleOrder = ['orchestrator', 'sm', 'tea', 'dev', 'reviewer', 'architect', 'pm', 'tech-writer', 'ux-designer', 'devops', 'ba'];
|
|
171
|
-
enhancedAgents.sort((a, b) => {
|
|
172
|
-
const aIndex = roleOrder.indexOf(a.role);
|
|
173
|
-
const bIndex = roleOrder.indexOf(b.role);
|
|
174
|
-
if (aIndex === -1 && bIndex === -1)
|
|
175
|
-
return a.role.localeCompare(b.role);
|
|
176
|
-
if (aIndex === -1)
|
|
177
|
-
return 1;
|
|
178
|
-
if (bIndex === -1)
|
|
179
|
-
return -1;
|
|
180
|
-
return aIndex - bIndex;
|
|
181
|
-
});
|
|
182
|
-
return {
|
|
183
|
-
theme: config.theme,
|
|
184
|
-
themeName,
|
|
185
|
-
tier: tier,
|
|
186
|
-
agents: enhancedAgents,
|
|
187
|
-
};
|
|
188
|
-
}
|
|
189
|
-
/**
|
|
190
|
-
* Create theme agents API router
|
|
191
|
-
*/
|
|
192
|
-
export function createThemeAgentsRouter(getProjectDir) {
|
|
193
|
-
const router = Router();
|
|
194
|
-
// Theme Agents API - GET all agent character mappings (legacy format)
|
|
195
|
-
router.get('/', (_req, res) => {
|
|
196
|
-
const projectDir = getProjectDir();
|
|
197
|
-
const agents = getThemeAgents(projectDir);
|
|
198
|
-
if (!agents) {
|
|
199
|
-
return res.status(404).json({ error: 'No theme agents found' });
|
|
200
|
-
}
|
|
201
|
-
res.json(agents);
|
|
202
|
-
});
|
|
203
|
-
// MSSCI-12403: Enhanced theme data for persona popup team roster
|
|
204
|
-
router.get('/full', (_req, res) => {
|
|
205
|
-
const projectDir = getProjectDir();
|
|
206
|
-
const themeData = getEnhancedThemeData(projectDir);
|
|
207
|
-
if (!themeData) {
|
|
208
|
-
return res.status(404).json({ error: 'No theme data found' });
|
|
209
|
-
}
|
|
210
|
-
res.json(themeData);
|
|
211
|
-
});
|
|
212
|
-
return router;
|
|
213
|
-
}
|
|
1
|
+
// Re-export from @pennyfarthing/core (Story 98-17)
|
|
2
|
+
export * from '@pennyfarthing/core/dist/server/api/theme-agents.js';
|
|
214
3
|
//# sourceMappingURL=theme-agents.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme-agents.js","sourceRoot":"","sources":["../../src/api/theme-agents.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"theme-agents.js","sourceRoot":"","sources":["../../src/api/theme-agents.ts"],"names":[],"mappings":"AAAA,mDAAmD;AACnD,cAAc,qDAAqD,CAAC"}
|
package/dist/api/todos.d.ts
CHANGED
|
@@ -1,33 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
* Todos API Router
|
|
3
|
-
*
|
|
4
|
-
* Provides HTTP API endpoint for todo list data.
|
|
5
|
-
* In web mode, todos are limited since they come from Claude's message stream
|
|
6
|
-
* which is only available in Electron mode. This endpoint returns empty array
|
|
7
|
-
* in web mode to allow graceful degradation.
|
|
8
|
-
*
|
|
9
|
-
* GET /api/todos - Get current todos (empty in web mode)
|
|
10
|
-
*/
|
|
11
|
-
import { Router } from 'express';
|
|
12
|
-
declare let webModeTodos: Array<{
|
|
13
|
-
id: string;
|
|
14
|
-
content: string;
|
|
15
|
-
activeForm: string;
|
|
16
|
-
status: 'pending' | 'in_progress' | 'completed';
|
|
17
|
-
blockedBy?: string[];
|
|
18
|
-
blocks?: string[];
|
|
19
|
-
}>;
|
|
20
|
-
/**
|
|
21
|
-
* Update todos from external source (for future WebSocket integration)
|
|
22
|
-
*/
|
|
23
|
-
export declare function setWebModeTodos(todos: typeof webModeTodos): void;
|
|
24
|
-
/**
|
|
25
|
-
* Get current web mode todos
|
|
26
|
-
*/
|
|
27
|
-
export declare function getWebModeTodos(): typeof webModeTodos;
|
|
28
|
-
/**
|
|
29
|
-
* Create the todos router
|
|
30
|
-
*/
|
|
31
|
-
export declare function createTodosRouter(): Router;
|
|
32
|
-
export {};
|
|
1
|
+
export * from '@pennyfarthing/core/dist/server/api/todos.js';
|
|
33
2
|
//# sourceMappingURL=todos.d.ts.map
|
package/dist/api/todos.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"todos.d.ts","sourceRoot":"","sources":["../../src/api/todos.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"todos.d.ts","sourceRoot":"","sources":["../../src/api/todos.ts"],"names":[],"mappings":"AACA,cAAc,8CAA8C,CAAC"}
|
package/dist/api/todos.js
CHANGED
|
@@ -1,44 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* Provides HTTP API endpoint for todo list data.
|
|
5
|
-
* In web mode, todos are limited since they come from Claude's message stream
|
|
6
|
-
* which is only available in Electron mode. This endpoint returns empty array
|
|
7
|
-
* in web mode to allow graceful degradation.
|
|
8
|
-
*
|
|
9
|
-
* GET /api/todos - Get current todos (empty in web mode)
|
|
10
|
-
*/
|
|
11
|
-
import { Router } from 'express';
|
|
12
|
-
// In-memory todos store for web mode
|
|
13
|
-
// In Electron mode, todos are managed by main.ts and accessed via IPC
|
|
14
|
-
// In web mode, this could be populated via WebSocket in the future
|
|
15
|
-
let webModeTodos = [];
|
|
16
|
-
/**
|
|
17
|
-
* Update todos from external source (for future WebSocket integration)
|
|
18
|
-
*/
|
|
19
|
-
export function setWebModeTodos(todos) {
|
|
20
|
-
webModeTodos = todos;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Get current web mode todos
|
|
24
|
-
*/
|
|
25
|
-
export function getWebModeTodos() {
|
|
26
|
-
return webModeTodos;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Create the todos router
|
|
30
|
-
*/
|
|
31
|
-
export function createTodosRouter() {
|
|
32
|
-
const router = Router();
|
|
33
|
-
/**
|
|
34
|
-
* GET / - Get current todos
|
|
35
|
-
* Returns empty array in web mode (todos require Claude message stream)
|
|
36
|
-
*/
|
|
37
|
-
router.get('/', (_req, res) => {
|
|
38
|
-
// In web mode, return whatever todos we have (usually empty)
|
|
39
|
-
// In the future, this could be populated via WebSocket from Claude stream
|
|
40
|
-
res.json(webModeTodos);
|
|
41
|
-
});
|
|
42
|
-
return router;
|
|
43
|
-
}
|
|
1
|
+
// Re-export from @pennyfarthing/core (Story 98-17)
|
|
2
|
+
export * from '@pennyfarthing/core/dist/server/api/todos.js';
|
|
44
3
|
//# sourceMappingURL=todos.js.map
|
package/dist/api/todos.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"todos.js","sourceRoot":"","sources":["../../src/api/todos.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"todos.js","sourceRoot":"","sources":["../../src/api/todos.ts"],"names":[],"mappings":"AAAA,mDAAmD;AACnD,cAAc,8CAA8C,CAAC"}
|
|
@@ -1,8 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import { WebSocket } from 'ws';
|
|
3
|
-
import { TokenStats } from '../otlp-receiver.js';
|
|
4
|
-
export declare function getTokenStatsClients(): Set<WebSocket>;
|
|
5
|
-
export declare function broadcastTokenStats(stats: TokenStats): void;
|
|
6
|
-
export declare function createTokenStatsRouter(): Router;
|
|
7
|
-
export declare function initTokenStatsBroadcast(): void;
|
|
1
|
+
export * from '@pennyfarthing/core/dist/server/api/token-stats.js';
|
|
8
2
|
//# sourceMappingURL=token-stats.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"token-stats.d.ts","sourceRoot":"","sources":["../../src/api/token-stats.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"token-stats.d.ts","sourceRoot":"","sources":["../../src/api/token-stats.ts"],"names":[],"mappings":"AACA,cAAc,oDAAoD,CAAC"}
|
package/dist/api/token-stats.js
CHANGED
|
@@ -1,36 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { getTokenStats, addTokenStatsListener } from '../otlp-receiver.js';
|
|
4
|
-
// Token stats WebSocket clients (for real-time updates)
|
|
5
|
-
const tokenStatsClients = new Set();
|
|
6
|
-
// Get token stats clients set (for WebSocket setup)
|
|
7
|
-
export function getTokenStatsClients() {
|
|
8
|
-
return tokenStatsClients;
|
|
9
|
-
}
|
|
10
|
-
// Broadcast token stats to all connected WebSocket clients
|
|
11
|
-
export function broadcastTokenStats(stats) {
|
|
12
|
-
const message = JSON.stringify(stats);
|
|
13
|
-
for (const client of tokenStatsClients) {
|
|
14
|
-
if (client.readyState === WebSocket.OPEN) {
|
|
15
|
-
client.send(message);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
// Create token stats API router
|
|
20
|
-
export function createTokenStatsRouter() {
|
|
21
|
-
const router = Router();
|
|
22
|
-
// Token Stats API - GET current token stats
|
|
23
|
-
router.get('/', (_req, res) => {
|
|
24
|
-
res.json(getTokenStats());
|
|
25
|
-
});
|
|
26
|
-
return router;
|
|
27
|
-
}
|
|
28
|
-
// Initialize token stats listener for WebSocket broadcasts
|
|
29
|
-
// Called once during server setup
|
|
30
|
-
// Uses addTokenStatsListener to support multiple subscribers (e.g., IPC + WebSocket)
|
|
31
|
-
export function initTokenStatsBroadcast() {
|
|
32
|
-
addTokenStatsListener((stats) => {
|
|
33
|
-
broadcastTokenStats(stats);
|
|
34
|
-
});
|
|
35
|
-
}
|
|
1
|
+
// Re-export from @pennyfarthing/core (Story 98-17)
|
|
2
|
+
export * from '@pennyfarthing/core/dist/server/api/token-stats.js';
|
|
36
3
|
//# sourceMappingURL=token-stats.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"token-stats.js","sourceRoot":"","sources":["../../src/api/token-stats.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"token-stats.js","sourceRoot":"","sources":["../../src/api/token-stats.ts"],"names":[],"mappings":"AAAA,mDAAmD;AACnD,cAAc,oDAAoD,CAAC"}
|
package/dist/api/welcome.d.ts
CHANGED
|
@@ -1,22 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
* Welcome API - Broadcasts welcome messages on session start
|
|
3
|
-
*
|
|
4
|
-
* When the SessionStart hook runs, it calls POST /api/welcome with
|
|
5
|
-
* project name and theme. This module broadcasts that to all connected
|
|
6
|
-
* WebSocket clients on /ws/welcome so Cyclist can display a welcome
|
|
7
|
-
* message with the pennyfarthing logo.
|
|
8
|
-
*/
|
|
9
|
-
import { WebSocket } from 'ws';
|
|
10
|
-
export interface WelcomeMessage {
|
|
11
|
-
project: string;
|
|
12
|
-
theme: string;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Get the set of connected welcome clients
|
|
16
|
-
*/
|
|
17
|
-
export declare function getWelcomeClients(): Set<WebSocket>;
|
|
18
|
-
/**
|
|
19
|
-
* Broadcast a welcome message to all connected clients
|
|
20
|
-
*/
|
|
21
|
-
export declare function broadcastWelcome(message: WelcomeMessage): void;
|
|
1
|
+
export * from '@pennyfarthing/core/dist/server/api/welcome.js';
|
|
22
2
|
//# sourceMappingURL=welcome.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"welcome.d.ts","sourceRoot":"","sources":["../../src/api/welcome.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"welcome.d.ts","sourceRoot":"","sources":["../../src/api/welcome.ts"],"names":[],"mappings":"AACA,cAAc,gDAAgD,CAAC"}
|
package/dist/api/welcome.js
CHANGED
|
@@ -1,35 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* When the SessionStart hook runs, it calls POST /api/welcome with
|
|
5
|
-
* project name and theme. This module broadcasts that to all connected
|
|
6
|
-
* WebSocket clients on /ws/welcome so Cyclist can display a welcome
|
|
7
|
-
* message with the pennyfarthing logo.
|
|
8
|
-
*/
|
|
9
|
-
import { WebSocket } from 'ws';
|
|
10
|
-
// WebSocket clients subscribed to welcome events
|
|
11
|
-
const welcomeClients = new Set();
|
|
12
|
-
/**
|
|
13
|
-
* Get the set of connected welcome clients
|
|
14
|
-
*/
|
|
15
|
-
export function getWelcomeClients() {
|
|
16
|
-
return welcomeClients;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Broadcast a welcome message to all connected clients
|
|
20
|
-
*/
|
|
21
|
-
export function broadcastWelcome(message) {
|
|
22
|
-
const payload = JSON.stringify({
|
|
23
|
-
type: 'welcome',
|
|
24
|
-
project: message.project,
|
|
25
|
-
theme: message.theme,
|
|
26
|
-
timestamp: Date.now(),
|
|
27
|
-
});
|
|
28
|
-
for (const client of welcomeClients) {
|
|
29
|
-
if (client.readyState === WebSocket.OPEN) {
|
|
30
|
-
client.send(payload);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
console.log(`[Welcome] Broadcast to ${welcomeClients.size} clients:`, message);
|
|
34
|
-
}
|
|
1
|
+
// Re-export from @pennyfarthing/core (Story 98-17)
|
|
2
|
+
export * from '@pennyfarthing/core/dist/server/api/welcome.js';
|
|
35
3
|
//# sourceMappingURL=welcome.js.map
|
package/dist/api/welcome.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"welcome.js","sourceRoot":"","sources":["../../src/api/welcome.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"welcome.js","sourceRoot":"","sources":["../../src/api/welcome.ts"],"names":[],"mappings":"AAAA,mDAAmD;AACnD,cAAc,gDAAgD,CAAC"}
|
package/dist/env.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../src/env.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,wBAAgB,cAAc,IAAI,OAAO,CAExC"}
|
package/dist/env.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// BikeRack mode detection (ADR-0024, Rule 1)
|
|
2
|
+
// Extracted to break circular import: server → api/index → mode → server
|
|
3
|
+
/**
|
|
4
|
+
* Centralized gate — all mode checks go through this function.
|
|
5
|
+
* Returns true when IS_BIKERACK env var is set (by bikerack.ts entry point).
|
|
6
|
+
*/
|
|
7
|
+
export function isBikeRackMode() {
|
|
8
|
+
return process.env.IS_BIKERACK === '1';
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=env.js.map
|
package/dist/env.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env.js","sourceRoot":"","sources":["../src/env.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,yEAAyE;AAEzE;;;GAGG;AACH,MAAM,UAAU,cAAc;IAC5B,OAAO,OAAO,CAAC,GAAG,CAAC,WAAW,KAAK,GAAG,CAAC;AACzC,CAAC"}
|
package/dist/focus.d.ts
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Focus panel management — reads/writes focus state from config.local.yaml
|
|
3
|
+
*
|
|
4
|
+
* Story 104-2: WheelHub config file watch + panel focus broadcast
|
|
5
|
+
* Epic 104: /bc CLI Panel Focus (MSSCI-14952)
|
|
6
|
+
*
|
|
7
|
+
* Extracted from websocket.ts for testability. The websocket module
|
|
8
|
+
* imports these functions and wires them into the WS channel + config watcher.
|
|
9
|
+
*/
|
|
10
|
+
/** Valid panel IDs that can be focused */
|
|
11
|
+
export declare const VALID_FOCUS_PANELS: readonly ["sprint", "git", "diffs", "todo", "workflow", "background", "audit-log", "changed", "ac", "debug", "settings"];
|
|
12
|
+
export type FocusPanelId = typeof VALID_FOCUS_PANELS[number];
|
|
13
|
+
export interface FocusMessage {
|
|
14
|
+
type: 'init' | 'update';
|
|
15
|
+
focus: string | null;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Read the current focus value from config.local.yaml.
|
|
19
|
+
* Returns the panel ID string or null if no focus is set.
|
|
20
|
+
*/
|
|
21
|
+
export declare function getConfigFocus(projectDir: string): string | null;
|
|
22
|
+
/**
|
|
23
|
+
* Determine if a focus broadcast should be sent.
|
|
24
|
+
* Only returns true when the focus value has actually changed.
|
|
25
|
+
*/
|
|
26
|
+
export declare function shouldBroadcastFocus(newFocus: string | null, lastKnownFocus: string | null): boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Create a focus WebSocket message payload.
|
|
29
|
+
*/
|
|
30
|
+
export declare function createFocusMessage(type: 'init' | 'update', focus: string | null): FocusMessage;
|
|
31
|
+
/**
|
|
32
|
+
* Validate that a panel ID is a valid focus target.
|
|
33
|
+
*/
|
|
34
|
+
export declare function isValidFocusPanel(panelId: string): boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Read the last-viewed panel from config.local.yaml.
|
|
37
|
+
*
|
|
38
|
+
* Story 103-8: Panel persistence — single source of truth for last-viewed
|
|
39
|
+
* panel, shared between ERB (BikeRack) and TUI.
|
|
40
|
+
*
|
|
41
|
+
* Returns the panel ID string or null if not saved.
|
|
42
|
+
*/
|
|
43
|
+
export declare function getLastPanel(projectDir: string): string | null;
|
|
44
|
+
/**
|
|
45
|
+
* Save the last-viewed panel to config.local.yaml.
|
|
46
|
+
*
|
|
47
|
+
* Story 103-8: Panel persistence — persists the active panel so it can
|
|
48
|
+
* be restored on next launch. Preserves other config keys.
|
|
49
|
+
*
|
|
50
|
+
* Returns true on success, false on failure.
|
|
51
|
+
*/
|
|
52
|
+
export declare function saveLastPanel(projectDir: string, panelId: string): boolean;
|
|
53
|
+
//# sourceMappingURL=focus.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"focus.d.ts","sourceRoot":"","sources":["../src/focus.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH,0CAA0C;AAC1C,eAAO,MAAM,kBAAkB,0HAGrB,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,OAAO,kBAAkB,CAAC,MAAM,CAAC,CAAC;AAE7D,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,GAAG,QAAQ,CAAC;IACxB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAahE;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,MAAM,GAAG,IAAI,EACvB,cAAc,EAAE,MAAM,GAAG,IAAI,GAC5B,OAAO,CAET;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,MAAM,GAAG,QAAQ,EACvB,KAAK,EAAE,MAAM,GAAG,IAAI,GACnB,YAAY,CAEd;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAE1D;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAgB9D;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAyB1E"}
|