@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
package/dist/server.d.ts
CHANGED
|
@@ -1,90 +1,21 @@
|
|
|
1
|
-
import { Express } from 'express';
|
|
2
|
-
import { Server } from 'http';
|
|
3
|
-
export { broadcastStats } from './api/index.js';
|
|
4
|
-
export { getStoryInfo } from './story-parser.js';
|
|
5
|
-
export type { StoryInfo, WorkflowStep, CriteriaItem } from './story-parser.js';
|
|
6
|
-
export { getGitInfo, getAllReposGitInfo, getAllReposGitInfoAsync } from './api/index.js';
|
|
7
|
-
export type { GitInfo } from './api/index.js';
|
|
8
|
-
export declare function isBikeRackMode(): boolean;
|
|
9
|
-
export declare const app: Express;
|
|
10
|
-
export declare function createTerminalServer(): Server;
|
|
11
|
-
/**
|
|
12
|
-
* Find an available port starting from the given port.
|
|
13
|
-
* Tries ports sequentially until one is available or maxAttempts reached.
|
|
14
|
-
* Used by both Electron mode and standalone server mode.
|
|
15
|
-
*/
|
|
16
|
-
export declare function findAvailablePort(startPort: number, maxAttempts?: number): Promise<number>;
|
|
17
|
-
/**
|
|
18
|
-
* Write the server port to a .cyclist-port file for auto-discovery.
|
|
19
|
-
* Called when Cyclist server starts to enable hook-based OTEL configuration.
|
|
20
|
-
*/
|
|
21
|
-
export declare function writePortFile(projectDir: string, port: number): void;
|
|
22
|
-
/**
|
|
23
|
-
* Remove the .cyclist-port file during shutdown.
|
|
24
|
-
* Prevents stale port files from pointing to non-existent servers.
|
|
25
|
-
*/
|
|
26
|
-
export declare function cleanupPortFile(projectDir: string): void;
|
|
27
|
-
/**
|
|
28
|
-
* Read the port number from .cyclist-port file.
|
|
29
|
-
* Returns null if file doesn't exist, is empty, or contains invalid content.
|
|
30
|
-
*/
|
|
31
|
-
export declare function readPortFile(projectDir: string): number | null;
|
|
32
|
-
/**
|
|
33
|
-
* Write the approval server port to .cyclist-approval-port file.
|
|
34
|
-
* Enables hook script to discover which port this instance is using.
|
|
35
|
-
*/
|
|
36
|
-
export declare function writeApprovalPortFile(projectDir: string, port: number): void;
|
|
37
|
-
/**
|
|
38
|
-
* Remove the .cyclist-approval-port file during shutdown.
|
|
39
|
-
* Prevents stale port files from causing cross-instance interference.
|
|
40
|
-
*/
|
|
41
|
-
export declare function cleanupApprovalPortFile(projectDir: string): void;
|
|
42
|
-
/**
|
|
43
|
-
* Read the approval server port from .cyclist-approval-port file.
|
|
44
|
-
* Returns null if file doesn't exist or contains invalid content.
|
|
45
|
-
*/
|
|
46
|
-
export declare function readApprovalPortFile(projectDir: string): number | null;
|
|
47
1
|
/**
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* Remove the .cyclist-pid file during shutdown.
|
|
54
|
-
* Prevents stale PID files from causing incorrect process termination.
|
|
55
|
-
*/
|
|
56
|
-
export declare function cleanupPidFile(projectDir: string): void;
|
|
57
|
-
/**
|
|
58
|
-
* Read the PID from .cyclist-pid file.
|
|
59
|
-
* Returns null if file doesn't exist, is empty, or contains invalid content.
|
|
60
|
-
*/
|
|
61
|
-
export declare function readPidFile(projectDir: string): number | null;
|
|
62
|
-
/**
|
|
63
|
-
* Check if a process with the given PID is still running.
|
|
64
|
-
* Returns true if process exists, false otherwise.
|
|
65
|
-
*/
|
|
66
|
-
export declare function isProcessRunning(pid: number): boolean;
|
|
67
|
-
/**
|
|
68
|
-
* OTEL configuration type for Claude Code telemetry
|
|
69
|
-
* Extends Record<string, string> for compatibility with process.env spreading
|
|
70
|
-
*/
|
|
71
|
-
export interface OtelConfig extends Record<string, string> {
|
|
72
|
-
CLAUDE_CODE_ENABLE_TELEMETRY: string;
|
|
73
|
-
OTEL_LOGS_EXPORTER: string;
|
|
74
|
-
OTEL_METRICS_EXPORTER: string;
|
|
75
|
-
OTEL_EXPORTER_OTLP_PROTOCOL: string;
|
|
76
|
-
OTEL_EXPORTER_OTLP_ENDPOINT: string;
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* Get OTEL configuration environment variables based on port file.
|
|
80
|
-
* Returns null if no valid port file exists.
|
|
2
|
+
* Server module for Cyclist.
|
|
3
|
+
*
|
|
4
|
+
* Thin wrapper around @pennyfarthing/core/server that overrides
|
|
5
|
+
* createTerminalServer to use Cyclist's real WebSocket implementation.
|
|
81
6
|
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
* - OTEL_LOGS_EXPORTER=otlp to export tool events
|
|
85
|
-
* - OTEL_METRICS_EXPORTER=otlp to export token metrics
|
|
7
|
+
* All Express app configuration, API routes, settings initialization,
|
|
8
|
+
* and utility functions are provided by core. Cyclist adds WebSocket support.
|
|
86
9
|
*
|
|
87
|
-
*
|
|
10
|
+
* Story 98-17: Move web server and API layer into core.
|
|
88
11
|
*/
|
|
89
|
-
|
|
12
|
+
import { type Server } from 'http';
|
|
13
|
+
/**
|
|
14
|
+
* Create HTTP server with Cyclist's WebSocket support.
|
|
15
|
+
* Overrides core's no-op WebSocket stub with the real implementation
|
|
16
|
+
* that handles stats, persona, token-stats, bell, welcome, hooks, etc.
|
|
17
|
+
*/
|
|
18
|
+
export declare function createTerminalServer(): Server;
|
|
19
|
+
export { app, getProjectDir, broadcastStats, getStoryInfo, getGitInfo, getAllReposGitInfo, getAllReposGitInfoAsync, publicDir, nodeModulesDir, portraitsDir, getProjectDirectory, getDistDir, setProjectDirectory, resetProjectDirectory, parseProjectDirArg, isValidProjectDirectory, findAvailablePort, writePortFile, cleanupPortFile, readPortFile, writeApprovalPortFile, cleanupApprovalPortFile, readApprovalPortFile, writePidFile, cleanupPidFile, readPidFile, isProcessRunning, getOtelConfig, isBikeRackMode, clearSessionGrants, } from '@pennyfarthing/core/server';
|
|
20
|
+
export type { StoryInfo, WorkflowStep, CriteriaItem, GitInfo, OtelConfig, } from '@pennyfarthing/core/server';
|
|
90
21
|
//# sourceMappingURL=server.d.ts.map
|
package/dist/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAgB,KAAK,MAAM,EAAE,MAAM,MAAM,CAAC;AASjD;;;;GAIG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,CAI7C;AAOD,OAAO,EACL,GAAG,EACH,aAAa,EAEb,cAAc,EACd,YAAY,EACZ,UAAU,EACV,kBAAkB,EAClB,uBAAuB,EAEvB,SAAS,EACT,cAAc,EACd,YAAY,EACZ,mBAAmB,EACnB,UAAU,EACV,mBAAmB,EACnB,qBAAqB,EACrB,kBAAkB,EAClB,uBAAuB,EAEvB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,YAAY,EACZ,qBAAqB,EACrB,uBAAuB,EACvB,oBAAoB,EACpB,YAAY,EACZ,cAAc,EACd,WAAW,EACX,gBAAgB,EAEhB,aAAa,EAEb,cAAc,EAEd,kBAAkB,GACnB,MAAM,4BAA4B,CAAC;AAGpC,YAAY,EACV,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,OAAO,EACP,UAAU,GACX,MAAM,4BAA4B,CAAC"}
|
package/dist/server.js
CHANGED
|
@@ -1,417 +1,46 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Server module for Cyclist.
|
|
3
|
+
*
|
|
4
|
+
* Thin wrapper around @pennyfarthing/core/server that overrides
|
|
5
|
+
* createTerminalServer to use Cyclist's real WebSocket implementation.
|
|
6
|
+
*
|
|
7
|
+
* All Express app configuration, API routes, settings initialization,
|
|
8
|
+
* and utility functions are provided by core. Cyclist adds WebSocket support.
|
|
9
|
+
*
|
|
10
|
+
* Story 98-17: Move web server and API layer into core.
|
|
11
|
+
*/
|
|
3
12
|
import { createServer } from 'http';
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
//
|
|
7
|
-
|
|
8
|
-
// API routers
|
|
9
|
-
import { createStatsRouter, createPortraitRouter, createPersonaRouter, createGitRouter, createOTLPRouter, createStoryRouter, createFileBrowserRouter, createTokenStatsRouter, createContextRouter, createThemeAgentsRouter, createModeRouter, createTelemetryRouter, createEvaluationRouter, createSettingsRouter, initTokenStatsBroadcast, createBackgroundTasksRouter, initBackgroundTaskBroadcast, createSpansRouter, createHookRequestRouter, createIdentityRouter, createTodosRouter, createHotspotsRouter, createCodeMarkersRouter, createPermissionsRouter, createAgentLoadRouter, createDeadCodeRouter, createComplexityRouter, createDependenciesRouter, createHealthScoreRouter, } from './api/index.js';
|
|
10
|
-
// Settings initialization (35-6: required for font settings persistence)
|
|
11
|
-
import { initializeSettings, loadGrants, saveGrants } from './settings.js';
|
|
12
|
-
// Grant initialization (MSSCI-14321: grants must be available in standalone server mode)
|
|
13
|
-
import { initializeGrants, setGrantsPersistCallback, clearSessionGrants } from './settings-store.js';
|
|
14
|
-
// WebSocket setup
|
|
13
|
+
// Import core's pre-configured Express app and project dir helper
|
|
14
|
+
import { app, getProjectDir } from '@pennyfarthing/core/server';
|
|
15
|
+
// Import Cyclist's real WebSocket implementation (1600+ lines)
|
|
16
|
+
// Core has a no-op stub; Cyclist provides the real thing with 15+ channel handlers
|
|
15
17
|
import { setupWebSocketServers } from './websocket.js';
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
export { getGitInfo, getAllReposGitInfo, getAllReposGitInfoAsync } from './api/index.js';
|
|
22
|
-
// BikeRack mode detection (ADR-0024, Rule 1)
|
|
23
|
-
// Centralized gate — all mode checks go through this function
|
|
24
|
-
export function isBikeRackMode() {
|
|
25
|
-
return process.env.IS_BIKERACK === '1';
|
|
26
|
-
}
|
|
27
|
-
export const app = express();
|
|
28
|
-
// Parse JSON bodies
|
|
29
|
-
app.use(express.json());
|
|
30
|
-
// Serve portraits from Pennyfarthing package (must be before general static)
|
|
31
|
-
if (portraitsDir) {
|
|
32
|
-
app.use('/portraits', express.static(portraitsDir));
|
|
33
|
-
}
|
|
34
|
-
// Serve static files from public directory
|
|
35
|
-
app.use(express.static(publicDir));
|
|
36
|
-
// Serve Vite build output (React components) from dist/public
|
|
37
|
-
// This is separate from src/public to avoid Vite overwriting source files
|
|
38
|
-
const distPublicDir = join(getDistDir(), 'public');
|
|
39
|
-
if (existsSync(distPublicDir)) {
|
|
40
|
-
app.use(express.static(distPublicDir));
|
|
41
|
-
}
|
|
42
|
-
// Serve node_modules for client-side imports (xterm.js)
|
|
43
|
-
app.use('/node_modules', express.static(nodeModulesDir));
|
|
44
|
-
// Health check endpoint (used by hooks to verify WheelHub is running)
|
|
45
|
-
app.get('/health', (_req, res) => {
|
|
46
|
-
res.json({ status: 'ok' });
|
|
47
|
-
});
|
|
48
|
-
// Serve index.html for root route
|
|
49
|
-
app.get('/', (_req, res) => {
|
|
50
|
-
res.sendFile(join(publicDir, 'index.html'));
|
|
51
|
-
});
|
|
52
|
-
// BikeRack index page (MSSCI-14822) — serves SPA, React handles routing
|
|
53
|
-
app.get('/bikerack', (_req, res) => {
|
|
54
|
-
res.sendFile(join(publicDir, 'index.html'));
|
|
55
|
-
});
|
|
56
|
-
// Serve pennyfarthing logo from project root (for welcome message)
|
|
57
|
-
app.get('/pennyfarthing-transparent.png', (_req, res) => {
|
|
58
|
-
const projectDir = getProjectDirectory() || process.cwd();
|
|
59
|
-
const logoPath = join(projectDir, 'pennyfarthing-transparent.png');
|
|
60
|
-
res.sendFile(logoPath, (err) => {
|
|
61
|
-
if (err) {
|
|
62
|
-
res.status(404).send('Logo not found');
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
});
|
|
66
|
-
// Wrapper that provides fallback to cwd for standalone server mode
|
|
67
|
-
function getProjectDir() {
|
|
68
|
-
return getProjectDirectory() || process.cwd();
|
|
69
|
-
}
|
|
70
|
-
// Initialize settings from file (35-6: required for font settings persistence)
|
|
71
|
-
// Must happen before settings router is used
|
|
72
|
-
initializeSettings(getProjectDir());
|
|
73
|
-
// Initialize grants for standalone server mode (MSSCI-14321)
|
|
74
|
-
// In Electron mode, main.ts handles this. In standalone/web mode, we do it here.
|
|
75
|
-
const grants = loadGrants();
|
|
76
|
-
initializeGrants(grants);
|
|
77
|
-
setGrantsPersistCallback(saveGrants);
|
|
78
|
-
// Mount API routers
|
|
79
|
-
app.use('/api/stats', createStatsRouter());
|
|
80
|
-
app.use('/api/portrait', createPortraitRouter());
|
|
81
|
-
app.use('/api/persona', createPersonaRouter(getProjectDir));
|
|
82
|
-
app.use('/api/story', createStoryRouter(getProjectDir));
|
|
83
|
-
app.use('/api/git', createGitRouter(getProjectDir));
|
|
84
|
-
app.use('/api/files', createFileBrowserRouter(getProjectDir));
|
|
85
|
-
app.use('/api/token-stats', createTokenStatsRouter());
|
|
86
|
-
app.use('/api/context', createContextRouter(getProjectDir));
|
|
87
|
-
app.use('/api/theme-agents', createThemeAgentsRouter(getProjectDir));
|
|
88
|
-
app.use('/api/mode', createModeRouter());
|
|
89
|
-
app.use('/api/telemetry', createTelemetryRouter());
|
|
90
|
-
app.use('/api/evaluation', createEvaluationRouter());
|
|
91
|
-
// 35-1: Settings API for contextual settings
|
|
92
|
-
app.use('/api/settings', createSettingsRouter());
|
|
93
|
-
// 35-16: Background tasks API
|
|
94
|
-
app.use('/api/background-tasks', createBackgroundTasksRouter());
|
|
95
|
-
// MSSCI-11734: Enriched spans API
|
|
96
|
-
app.use('/api/spans', createSpansRouter());
|
|
97
|
-
// MSSCI-12409: Hook request API (WheelHub consolidation)
|
|
98
|
-
app.use('/api/hook-request', createHookRequestRouter());
|
|
99
|
-
// MSSCI-12469: Identity API for stats strip
|
|
100
|
-
app.use('/api/identity', createIdentityRouter());
|
|
101
|
-
// Todos API for web mode fallback
|
|
102
|
-
app.use('/api/todos', createTodosRouter());
|
|
103
|
-
// Audit log API
|
|
104
|
-
import { createAuditLogRouter } from './api/audit-log.js';
|
|
105
|
-
app.use('/api/audit-log', createAuditLogRouter());
|
|
106
|
-
// MSSCI-14325: Permissions API (grant management)
|
|
107
|
-
app.use('/api/permissions', createPermissionsRouter());
|
|
108
|
-
// Hotspot analysis API
|
|
109
|
-
app.use('/api/hotspots', createHotspotsRouter(getProjectDir));
|
|
110
|
-
// MSSCI-14456: Code Markers API
|
|
111
|
-
app.use('/api/code-markers', createCodeMarkersRouter(getProjectDir));
|
|
112
|
-
// MSSCI-14460: Dead Code API
|
|
113
|
-
app.use('/api/dead-code', createDeadCodeRouter(getProjectDir));
|
|
114
|
-
// MSSCI-14461: Agent Load Analyzer
|
|
115
|
-
app.use('/api/agent-load', createAgentLoadRouter(getProjectDir));
|
|
116
|
-
// MSSCI-14468: Complexity + Dependencies APIs
|
|
117
|
-
app.use('/api/complexity', createComplexityRouter(getProjectDir));
|
|
118
|
-
app.use('/api/dependencies', createDependenciesRouter(getProjectDir));
|
|
119
|
-
// MSSCI-14471: Health Score API
|
|
120
|
-
app.use('/api/health-score', createHealthScoreRouter(getProjectDir));
|
|
121
|
-
// Welcome message endpoint (triggered by SessionStart hook)
|
|
122
|
-
// Broadcasts welcome message to /ws/welcome channel for Cyclist display
|
|
123
|
-
import { broadcastWelcome } from './api/welcome.js';
|
|
124
|
-
app.post('/api/welcome', (req, res) => {
|
|
125
|
-
const { project, theme } = req.body || {};
|
|
126
|
-
try {
|
|
127
|
-
broadcastWelcome({ project: project || '', theme: theme || '' });
|
|
128
|
-
res.json({ ok: true });
|
|
129
|
-
}
|
|
130
|
-
catch (err) {
|
|
131
|
-
console.error('[Welcome] Broadcast error:', err);
|
|
132
|
-
res.status(500).json({ error: 'Failed to broadcast welcome' });
|
|
133
|
-
}
|
|
134
|
-
});
|
|
135
|
-
// MSSCI-12275: Bell mode queue sync endpoint
|
|
136
|
-
// Writes message queue to .pennyfarthing/bell-queue.json for PostToolUse hook
|
|
137
|
-
app.post('/api/bell-queue', (req, res) => {
|
|
138
|
-
const projectDir = getProjectDir();
|
|
139
|
-
const queuePath = join(projectDir, '.pennyfarthing', 'bell-queue.json');
|
|
140
|
-
const configPath = join(projectDir, '.pennyfarthing', 'config.local.yaml');
|
|
141
|
-
// Only write if bell mode is enabled (read from config.local.yaml)
|
|
142
|
-
try {
|
|
143
|
-
let bellModeEnabled = false;
|
|
144
|
-
if (existsSync(configPath)) {
|
|
145
|
-
const configContent = readFileSync(configPath, 'utf8');
|
|
146
|
-
// Simple check for bell_mode: true in YAML
|
|
147
|
-
bellModeEnabled = /^\s*bell_mode:\s*true/m.test(configContent);
|
|
148
|
-
}
|
|
149
|
-
if (bellModeEnabled) {
|
|
150
|
-
const queue = req.body;
|
|
151
|
-
if (Array.isArray(queue)) {
|
|
152
|
-
writeFileSync(queuePath, JSON.stringify(queue, null, 2));
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
else if (existsSync(queuePath)) {
|
|
156
|
-
// Bell mode disabled - remove stale queue file
|
|
157
|
-
unlinkSync(queuePath);
|
|
158
|
-
}
|
|
159
|
-
res.json({ ok: true });
|
|
160
|
-
}
|
|
161
|
-
catch (err) {
|
|
162
|
-
console.error('[Bell Queue] Sync error:', err);
|
|
163
|
-
res.status(500).json({ error: 'Failed to sync bell queue' });
|
|
164
|
-
}
|
|
165
|
-
});
|
|
166
|
-
// Bell mode message consumed endpoint (called by PostToolUse hook)
|
|
167
|
-
// Broadcasts to browser to dequeue and display the injected message
|
|
168
|
-
import { broadcastBellConsumed } from './api/bell.js';
|
|
169
|
-
app.post('/api/bell-consumed', (req, res) => {
|
|
170
|
-
const { text } = req.body || {};
|
|
171
|
-
try {
|
|
172
|
-
broadcastBellConsumed(text || '');
|
|
173
|
-
res.json({ ok: true });
|
|
174
|
-
}
|
|
175
|
-
catch (err) {
|
|
176
|
-
console.error('[Bell Consumed] Broadcast error:', err);
|
|
177
|
-
res.status(500).json({ error: 'Failed to broadcast bell consumed' });
|
|
178
|
-
}
|
|
179
|
-
});
|
|
180
|
-
app.use('/v1', createOTLPRouter());
|
|
181
|
-
// Initialize token stats WebSocket broadcast callback
|
|
182
|
-
initTokenStatsBroadcast();
|
|
183
|
-
// 35-16: Initialize background task broadcast callback
|
|
184
|
-
initBackgroundTaskBroadcast();
|
|
185
|
-
// Create HTTP server with WebSocket support
|
|
18
|
+
/**
|
|
19
|
+
* Create HTTP server with Cyclist's WebSocket support.
|
|
20
|
+
* Overrides core's no-op WebSocket stub with the real implementation
|
|
21
|
+
* that handles stats, persona, token-stats, bell, welcome, hooks, etc.
|
|
22
|
+
*/
|
|
186
23
|
export function createTerminalServer() {
|
|
187
24
|
const server = createServer(app);
|
|
188
25
|
setupWebSocketServers(server, getProjectDir);
|
|
189
26
|
return server;
|
|
190
27
|
}
|
|
191
|
-
//
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
// Write port file for OTEL auto-configuration (Story 20-1)
|
|
210
|
-
writePortFile(projectDir, actualPort);
|
|
211
|
-
console.log(`[OTEL] Wrote .cyclist-port file to ${projectDir}`);
|
|
212
|
-
});
|
|
213
|
-
// Cleanup on shutdown
|
|
214
|
-
process.on('SIGINT', () => {
|
|
215
|
-
clearSessionGrants(); // MSSCI-14324: Clear session/once grants
|
|
216
|
-
cleanupPortFile(projectDir);
|
|
217
|
-
console.log('[OTEL] Cleaned up .cyclist-port file');
|
|
218
|
-
process.exit(0);
|
|
219
|
-
});
|
|
220
|
-
process.on('SIGTERM', () => {
|
|
221
|
-
clearSessionGrants(); // MSSCI-14324: Clear session/once grants
|
|
222
|
-
cleanupPortFile(projectDir);
|
|
223
|
-
process.exit(0);
|
|
224
|
-
});
|
|
225
|
-
})();
|
|
226
|
-
}
|
|
227
|
-
// ============================================================================
|
|
228
|
-
// Port File Discovery Pattern (Story 20-1)
|
|
229
|
-
// Port Conflict Detection (Story 34-3)
|
|
230
|
-
// ============================================================================
|
|
231
|
-
const PORT_FILE_NAME = '.cyclist-port';
|
|
232
|
-
const APPROVAL_PORT_FILE_NAME = '.cyclist-approval-port';
|
|
233
|
-
const PID_FILE_NAME = '.cyclist-pid';
|
|
234
|
-
/**
|
|
235
|
-
* Find an available port starting from the given port.
|
|
236
|
-
* Tries ports sequentially until one is available or maxAttempts reached.
|
|
237
|
-
* Used by both Electron mode and standalone server mode.
|
|
238
|
-
*/
|
|
239
|
-
export async function findAvailablePort(startPort, maxAttempts = 10) {
|
|
240
|
-
const net = await import('net');
|
|
241
|
-
for (let port = startPort; port < startPort + maxAttempts; port++) {
|
|
242
|
-
const available = await new Promise((resolve) => {
|
|
243
|
-
const testServer = net.createServer();
|
|
244
|
-
testServer.once('error', () => resolve(false));
|
|
245
|
-
testServer.once('listening', () => {
|
|
246
|
-
testServer.close();
|
|
247
|
-
resolve(true);
|
|
248
|
-
});
|
|
249
|
-
testServer.listen(port);
|
|
250
|
-
});
|
|
251
|
-
if (available) {
|
|
252
|
-
return port;
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
throw new Error(`No available port found in range ${startPort}-${startPort + maxAttempts - 1}`);
|
|
256
|
-
}
|
|
257
|
-
/**
|
|
258
|
-
* Write the server port to a .cyclist-port file for auto-discovery.
|
|
259
|
-
* Called when Cyclist server starts to enable hook-based OTEL configuration.
|
|
260
|
-
*/
|
|
261
|
-
export function writePortFile(projectDir, port) {
|
|
262
|
-
const portFilePath = join(projectDir, PORT_FILE_NAME);
|
|
263
|
-
writeFileSync(portFilePath, String(port));
|
|
264
|
-
}
|
|
265
|
-
/**
|
|
266
|
-
* Remove the .cyclist-port file during shutdown.
|
|
267
|
-
* Prevents stale port files from pointing to non-existent servers.
|
|
268
|
-
*/
|
|
269
|
-
export function cleanupPortFile(projectDir) {
|
|
270
|
-
const portFilePath = join(projectDir, PORT_FILE_NAME);
|
|
271
|
-
if (existsSync(portFilePath)) {
|
|
272
|
-
unlinkSync(portFilePath);
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
/**
|
|
276
|
-
* Read the port number from .cyclist-port file.
|
|
277
|
-
* Returns null if file doesn't exist, is empty, or contains invalid content.
|
|
278
|
-
*/
|
|
279
|
-
export function readPortFile(projectDir) {
|
|
280
|
-
const portFilePath = join(projectDir, PORT_FILE_NAME);
|
|
281
|
-
if (!existsSync(portFilePath)) {
|
|
282
|
-
return null;
|
|
283
|
-
}
|
|
284
|
-
const content = readFileSync(portFilePath, 'utf-8').trim();
|
|
285
|
-
if (!content) {
|
|
286
|
-
return null;
|
|
287
|
-
}
|
|
288
|
-
const port = parseInt(content, 10);
|
|
289
|
-
if (isNaN(port)) {
|
|
290
|
-
return null;
|
|
291
|
-
}
|
|
292
|
-
return port;
|
|
293
|
-
}
|
|
294
|
-
// ============================================================================
|
|
295
|
-
// Approval Port File Pattern (Story 33-7)
|
|
296
|
-
// Enables multi-instance Cyclist with isolated approval servers
|
|
297
|
-
// ============================================================================
|
|
298
|
-
/**
|
|
299
|
-
* Write the approval server port to .cyclist-approval-port file.
|
|
300
|
-
* Enables hook script to discover which port this instance is using.
|
|
301
|
-
*/
|
|
302
|
-
export function writeApprovalPortFile(projectDir, port) {
|
|
303
|
-
const portFilePath = join(projectDir, APPROVAL_PORT_FILE_NAME);
|
|
304
|
-
writeFileSync(portFilePath, String(port));
|
|
305
|
-
}
|
|
306
|
-
/**
|
|
307
|
-
* Remove the .cyclist-approval-port file during shutdown.
|
|
308
|
-
* Prevents stale port files from causing cross-instance interference.
|
|
309
|
-
*/
|
|
310
|
-
export function cleanupApprovalPortFile(projectDir) {
|
|
311
|
-
const portFilePath = join(projectDir, APPROVAL_PORT_FILE_NAME);
|
|
312
|
-
if (existsSync(portFilePath)) {
|
|
313
|
-
unlinkSync(portFilePath);
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
/**
|
|
317
|
-
* Read the approval server port from .cyclist-approval-port file.
|
|
318
|
-
* Returns null if file doesn't exist or contains invalid content.
|
|
319
|
-
*/
|
|
320
|
-
export function readApprovalPortFile(projectDir) {
|
|
321
|
-
const portFilePath = join(projectDir, APPROVAL_PORT_FILE_NAME);
|
|
322
|
-
if (!existsSync(portFilePath)) {
|
|
323
|
-
return null;
|
|
324
|
-
}
|
|
325
|
-
const content = readFileSync(portFilePath, 'utf-8').trim();
|
|
326
|
-
if (!content) {
|
|
327
|
-
return null;
|
|
328
|
-
}
|
|
329
|
-
const port = parseInt(content, 10);
|
|
330
|
-
if (isNaN(port)) {
|
|
331
|
-
return null;
|
|
332
|
-
}
|
|
333
|
-
return port;
|
|
334
|
-
}
|
|
335
|
-
// ============================================================================
|
|
336
|
-
// PID File Pattern (Story B-24 fix)
|
|
337
|
-
// Tracks Claude CLI process PID to avoid killing other Cyclist sessions
|
|
338
|
-
// ============================================================================
|
|
339
|
-
/**
|
|
340
|
-
* Write the Claude process PID to .cyclist-pid file.
|
|
341
|
-
* Used to track which Claude process belongs to this Cyclist instance.
|
|
342
|
-
*/
|
|
343
|
-
export function writePidFile(projectDir, pid) {
|
|
344
|
-
const pidFilePath = join(projectDir, PID_FILE_NAME);
|
|
345
|
-
writeFileSync(pidFilePath, String(pid));
|
|
346
|
-
}
|
|
347
|
-
/**
|
|
348
|
-
* Remove the .cyclist-pid file during shutdown.
|
|
349
|
-
* Prevents stale PID files from causing incorrect process termination.
|
|
350
|
-
*/
|
|
351
|
-
export function cleanupPidFile(projectDir) {
|
|
352
|
-
const pidFilePath = join(projectDir, PID_FILE_NAME);
|
|
353
|
-
if (existsSync(pidFilePath)) {
|
|
354
|
-
unlinkSync(pidFilePath);
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
/**
|
|
358
|
-
* Read the PID from .cyclist-pid file.
|
|
359
|
-
* Returns null if file doesn't exist, is empty, or contains invalid content.
|
|
360
|
-
*/
|
|
361
|
-
export function readPidFile(projectDir) {
|
|
362
|
-
const pidFilePath = join(projectDir, PID_FILE_NAME);
|
|
363
|
-
if (!existsSync(pidFilePath)) {
|
|
364
|
-
return null;
|
|
365
|
-
}
|
|
366
|
-
const content = readFileSync(pidFilePath, 'utf-8').trim();
|
|
367
|
-
if (!content) {
|
|
368
|
-
return null;
|
|
369
|
-
}
|
|
370
|
-
const pid = parseInt(content, 10);
|
|
371
|
-
if (isNaN(pid)) {
|
|
372
|
-
return null;
|
|
373
|
-
}
|
|
374
|
-
return pid;
|
|
375
|
-
}
|
|
376
|
-
/**
|
|
377
|
-
* Check if a process with the given PID is still running.
|
|
378
|
-
* Returns true if process exists, false otherwise.
|
|
379
|
-
*/
|
|
380
|
-
export function isProcessRunning(pid) {
|
|
381
|
-
try {
|
|
382
|
-
// Sending signal 0 doesn't kill the process, just checks if it exists
|
|
383
|
-
process.kill(pid, 0);
|
|
384
|
-
return true;
|
|
385
|
-
}
|
|
386
|
-
catch {
|
|
387
|
-
return false;
|
|
388
|
-
}
|
|
389
|
-
}
|
|
390
|
-
/**
|
|
391
|
-
* Get OTEL configuration environment variables based on port file.
|
|
392
|
-
* Returns null if no valid port file exists.
|
|
393
|
-
*
|
|
394
|
-
* Claude Code requires explicit opt-in for telemetry:
|
|
395
|
-
* - CLAUDE_CODE_ENABLE_TELEMETRY=1 to enable telemetry
|
|
396
|
-
* - OTEL_LOGS_EXPORTER=otlp to export tool events
|
|
397
|
-
* - OTEL_METRICS_EXPORTER=otlp to export token metrics
|
|
398
|
-
*
|
|
399
|
-
* @see https://code.claude.com/docs/en/monitoring-usage
|
|
400
|
-
*/
|
|
401
|
-
export function getOtelConfig(projectDir) {
|
|
402
|
-
const port = readPortFile(projectDir);
|
|
403
|
-
if (port === null) {
|
|
404
|
-
return null;
|
|
405
|
-
}
|
|
406
|
-
return {
|
|
407
|
-
// Enable telemetry (opt-in required)
|
|
408
|
-
CLAUDE_CODE_ENABLE_TELEMETRY: '1',
|
|
409
|
-
// Configure exporters for logs (tool events) and metrics (tokens)
|
|
410
|
-
OTEL_LOGS_EXPORTER: 'otlp',
|
|
411
|
-
OTEL_METRICS_EXPORTER: 'otlp',
|
|
412
|
-
// HTTP/JSON protocol for Cyclist's Express server
|
|
413
|
-
OTEL_EXPORTER_OTLP_PROTOCOL: 'http/json',
|
|
414
|
-
OTEL_EXPORTER_OTLP_ENDPOINT: `http://localhost:${port}`,
|
|
415
|
-
};
|
|
416
|
-
}
|
|
28
|
+
// Re-export everything from core's server module that cyclist consumers need.
|
|
29
|
+
// bikerack.ts needs: createTerminalServer (overridden above), findAvailablePort
|
|
30
|
+
// main.ts needs: getStoryInfo, getAllReposGitInfoAsync, writePortFile, cleanupPortFile,
|
|
31
|
+
// writePidFile, cleanupPidFile, readPidFile, isProcessRunning, getOtelConfig
|
|
32
|
+
// websocket.ts needs: getOtelConfig, isBikeRackMode
|
|
33
|
+
export { app, getProjectDir,
|
|
34
|
+
// API re-exports
|
|
35
|
+
broadcastStats, getStoryInfo, getGitInfo, getAllReposGitInfo, getAllReposGitInfoAsync,
|
|
36
|
+
// Path utilities
|
|
37
|
+
publicDir, nodeModulesDir, portraitsDir, getProjectDirectory, getDistDir, setProjectDirectory, resetProjectDirectory, parseProjectDirArg, isValidProjectDirectory,
|
|
38
|
+
// Server utilities
|
|
39
|
+
findAvailablePort, writePortFile, cleanupPortFile, readPortFile, writeApprovalPortFile, cleanupApprovalPortFile, readApprovalPortFile, writePidFile, cleanupPidFile, readPidFile, isProcessRunning,
|
|
40
|
+
// OTEL
|
|
41
|
+
getOtelConfig,
|
|
42
|
+
// Env
|
|
43
|
+
isBikeRackMode,
|
|
44
|
+
// Grants
|
|
45
|
+
clearSessionGrants, } from '@pennyfarthing/core/server';
|
|
417
46
|
//# sourceMappingURL=server.js.map
|
package/dist/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,OAAoB,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,YAAY,EAAU,MAAM,MAAM,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAEzE,kBAAkB;AAClB,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,YAAY,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAEtG,cAAc;AACd,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,uBAAuB,EACvB,sBAAsB,EACtB,mBAAmB,EACnB,uBAAuB,EACvB,gBAAgB,EAChB,qBAAqB,EACrB,sBAAsB,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EAAE,YAAY,EAAe,MAAM,MAAM,CAAC;AAEjD,kEAAkE;AAClE,OAAO,EAAE,GAAG,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAEhE,+DAA+D;AAC/D,mFAAmF;AACnF,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAEvD;;;;GAIG;AACH,MAAM,UAAU,oBAAoB;IAClC,MAAM,MAAM,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC;IACjC,qBAAqB,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IAC7C,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,8EAA8E;AAC9E,gFAAgF;AAChF,wFAAwF;AACxF,4FAA4F;AAC5F,oDAAoD;AACpD,OAAO,EACL,GAAG,EACH,aAAa;AACb,iBAAiB;AACjB,cAAc,EACd,YAAY,EACZ,UAAU,EACV,kBAAkB,EAClB,uBAAuB;AACvB,iBAAiB;AACjB,SAAS,EACT,cAAc,EACd,YAAY,EACZ,mBAAmB,EACnB,UAAU,EACV,mBAAmB,EACnB,qBAAqB,EACrB,kBAAkB,EAClB,uBAAuB;AACvB,mBAAmB;AACnB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,YAAY,EACZ,qBAAqB,EACrB,uBAAuB,EACvB,oBAAoB,EACpB,YAAY,EACZ,cAAc,EACd,WAAW,EACX,gBAAgB;AAChB,OAAO;AACP,aAAa;AACb,MAAM;AACN,cAAc;AACd,SAAS;AACT,kBAAkB,GACnB,MAAM,4BAA4B,CAAC"}
|
package/dist/sprint-data.d.ts
CHANGED
|
@@ -75,7 +75,7 @@ export interface SprintData {
|
|
|
75
75
|
/**
|
|
76
76
|
* Get aggregated sprint data for EnhancedSprintPanel
|
|
77
77
|
*/
|
|
78
|
-
export declare function getSprintData(projectDir: string): SprintData;
|
|
78
|
+
export declare function getSprintData(projectDir: string, _userEmail?: string | null): SprintData;
|
|
79
79
|
/**
|
|
80
80
|
* Archive a completed epic
|
|
81
81
|
* Returns true if successful, throws on error
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sprint-data.d.ts","sourceRoot":"","sources":["../src/sprint-data.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;
|
|
1
|
+
{"version":3,"file":"sprint-data.d.ts","sourceRoot":"","sources":["../src/sprint-data.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAYH,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,SAAS,GAAG,aAAa,GAAG,MAAM,GAAG,WAAW,GAAG,SAAS,CAAC;IACrE,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAED,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,OAAO,GAAG,SAAS,GAAG,UAAU,CAAC;CAC1C;AAED,MAAM,WAA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