@pennyfarthing/cyclist 10.4.0 → 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 +2 -2
- 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 +42 -75
- package/dist/websocket.js.map +1 -1
- package/package.json +3 -6
- 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/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,41 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
* Hook Request API Router
|
|
3
|
-
*
|
|
4
|
-
* Handles approval requests from Claude Code hooks via WheelHub.
|
|
5
|
-
* Per ADR-0004: All communication converges through WheelHub.
|
|
6
|
-
*
|
|
7
|
-
* Flow:
|
|
8
|
-
* 1. Hook script sends POST /api/hook-request with tool data
|
|
9
|
-
* 2. WheelHub checks allowlist/grants for auto-approval
|
|
10
|
-
* 3. If manual approval needed, broadcasts to WebSocket clients
|
|
11
|
-
* 4. Client shows approval modal, user decides
|
|
12
|
-
* 5. Client sends decision back via WebSocket
|
|
13
|
-
* 6. WheelHub returns HTTP response to hook
|
|
14
|
-
*
|
|
15
|
-
* Story: MSSCI-12409 - Hook consistency and WheelHub consolidation
|
|
16
|
-
*/
|
|
17
|
-
import { Router } from 'express';
|
|
18
|
-
import { WebSocket } from 'ws';
|
|
19
|
-
export type HookSeverity = 'safe' | 'normal' | 'destructive';
|
|
20
|
-
interface SeverityResult {
|
|
21
|
-
severity: HookSeverity;
|
|
22
|
-
warning?: string;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Classify the severity of a hook request server-side.
|
|
26
|
-
* Combines tool-name classification with dangerous-path detection.
|
|
27
|
-
*/
|
|
28
|
-
export declare function classifyHookSeverity(toolName: string, input: Record<string, unknown>): SeverityResult;
|
|
29
|
-
export declare function getHookClients(): Set<WebSocket>;
|
|
30
|
-
export declare function addHookClient(ws: WebSocket): void;
|
|
31
|
-
/**
|
|
32
|
-
* Resolve a pending approval from client response
|
|
33
|
-
*/
|
|
34
|
-
export declare function resolveApproval(toolId: string, approved: boolean, data?: Record<string, unknown>): boolean;
|
|
35
|
-
/**
|
|
36
|
-
* Handle WebSocket message from client
|
|
37
|
-
*/
|
|
38
|
-
export declare function handleHookWebSocketMessage(ws: WebSocket, message: string): void;
|
|
39
|
-
export declare function createHookRequestRouter(): Router;
|
|
40
|
-
export {};
|
|
1
|
+
export * from '@pennyfarthing/core/dist/server/api/hook-request.js';
|
|
41
2
|
//# sourceMappingURL=hook-request.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hook-request.d.ts","sourceRoot":"","sources":["../../src/api/hook-request.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hook-request.d.ts","sourceRoot":"","sources":["../../src/api/hook-request.ts"],"names":[],"mappings":"AACA,cAAc,qDAAqD,CAAC"}
|
package/dist/api/hook-request.js
CHANGED
|
@@ -1,278 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* Handles approval requests from Claude Code hooks via WheelHub.
|
|
5
|
-
* Per ADR-0004: All communication converges through WheelHub.
|
|
6
|
-
*
|
|
7
|
-
* Flow:
|
|
8
|
-
* 1. Hook script sends POST /api/hook-request with tool data
|
|
9
|
-
* 2. WheelHub checks allowlist/grants for auto-approval
|
|
10
|
-
* 3. If manual approval needed, broadcasts to WebSocket clients
|
|
11
|
-
* 4. Client shows approval modal, user decides
|
|
12
|
-
* 5. Client sends decision back via WebSocket
|
|
13
|
-
* 6. WheelHub returns HTTP response to hook
|
|
14
|
-
*
|
|
15
|
-
* Story: MSSCI-12409 - Hook consistency and WheelHub consolidation
|
|
16
|
-
*/
|
|
17
|
-
import { Router } from 'express';
|
|
18
|
-
import { WebSocket } from 'ws';
|
|
19
|
-
import { checkGrant, isAllowlisted, addGrant } from '../settings-store.js';
|
|
20
|
-
import { isDangerousPath, getPathCategory, extractBashTargetPaths } from '../dangerous-path.js';
|
|
21
|
-
// =============================================================================
|
|
22
|
-
// State
|
|
23
|
-
// =============================================================================
|
|
24
|
-
// Pending approval requests, keyed by toolId
|
|
25
|
-
const pendingApprovals = new Map();
|
|
26
|
-
// WebSocket clients for hook notifications
|
|
27
|
-
const hookClients = new Set();
|
|
28
|
-
// Approval timeout (2 minutes)
|
|
29
|
-
const APPROVAL_TIMEOUT_MS = 120000;
|
|
30
|
-
// =============================================================================
|
|
31
|
-
// Scope Extraction (MSSCI-14321)
|
|
32
|
-
// =============================================================================
|
|
33
|
-
/**
|
|
34
|
-
* Extract the scope identifier from tool input for grant matching.
|
|
35
|
-
* Modeled after getToolScope() in approval-gate.ts.
|
|
36
|
-
*/
|
|
37
|
-
function extractToolScope(toolName, input) {
|
|
38
|
-
switch (toolName) {
|
|
39
|
-
case 'Bash':
|
|
40
|
-
return input.command || '';
|
|
41
|
-
case 'WebFetch':
|
|
42
|
-
return input.url || '';
|
|
43
|
-
case 'Edit':
|
|
44
|
-
case 'Write':
|
|
45
|
-
case 'Read':
|
|
46
|
-
return input.file_path || '';
|
|
47
|
-
default:
|
|
48
|
-
return JSON.stringify(input);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
const SAFE_TOOLS = new Set(['Read', 'Grep', 'Glob', 'WebSearch']);
|
|
52
|
-
const DESTRUCTIVE_BASH_PATTERNS = [
|
|
53
|
-
/rm\s+(-[rf]+\s+)*/,
|
|
54
|
-
/git\s+(reset\s+--hard|push\s+--force|clean\s+-[fd])/,
|
|
55
|
-
/drop\s+database/i,
|
|
56
|
-
/truncate\s+table/i,
|
|
57
|
-
];
|
|
58
|
-
const SAFE_BASH_PATTERNS = [
|
|
59
|
-
/^(ls|cat|head|tail|grep|find|pwd|echo|which|type|file|stat|wc|diff)\b/,
|
|
60
|
-
/^git\s+(status|log|diff|show|branch|remote)\b/,
|
|
61
|
-
];
|
|
62
|
-
const CATEGORY_WARNINGS = {
|
|
63
|
-
secrets: 'Modifying sensitive secrets/credentials file',
|
|
64
|
-
git: 'Modifying git internals',
|
|
65
|
-
dependencies: 'Modifying dependency files',
|
|
66
|
-
system: 'Modifying system files',
|
|
67
|
-
};
|
|
68
|
-
/**
|
|
69
|
-
* Classify the severity of a hook request server-side.
|
|
70
|
-
* Combines tool-name classification with dangerous-path detection.
|
|
71
|
-
*/
|
|
72
|
-
export function classifyHookSeverity(toolName, input) {
|
|
73
|
-
// Safe tools are always safe
|
|
74
|
-
if (SAFE_TOOLS.has(toolName)) {
|
|
75
|
-
return { severity: 'safe' };
|
|
76
|
-
}
|
|
77
|
-
// Check dangerous paths for Write/Edit
|
|
78
|
-
if (toolName === 'Write' || toolName === 'Edit') {
|
|
79
|
-
const filePath = input.file_path || '';
|
|
80
|
-
if (filePath && isDangerousPath(filePath)) {
|
|
81
|
-
const category = getPathCategory(filePath);
|
|
82
|
-
return {
|
|
83
|
-
severity: 'destructive',
|
|
84
|
-
warning: category ? CATEGORY_WARNINGS[category] : 'Modifying sensitive path',
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
return { severity: 'normal' };
|
|
88
|
-
}
|
|
89
|
-
// Bash command classification
|
|
90
|
-
if (toolName === 'Bash') {
|
|
91
|
-
const command = input.command || '';
|
|
92
|
-
// Check for destructive bash patterns
|
|
93
|
-
if (DESTRUCTIVE_BASH_PATTERNS.some(p => p.test(command))) {
|
|
94
|
-
return { severity: 'destructive', warning: 'Destructive command detected' };
|
|
95
|
-
}
|
|
96
|
-
// Check for bash redirecting to dangerous paths
|
|
97
|
-
const targetPaths = extractBashTargetPaths(command);
|
|
98
|
-
for (const targetPath of targetPaths) {
|
|
99
|
-
if (isDangerousPath(targetPath)) {
|
|
100
|
-
const category = getPathCategory(targetPath);
|
|
101
|
-
return {
|
|
102
|
-
severity: 'destructive',
|
|
103
|
-
warning: category ? CATEGORY_WARNINGS[category] : 'Redirecting to sensitive path',
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
// Check for safe bash patterns
|
|
108
|
-
if (SAFE_BASH_PATTERNS.some(p => p.test(command))) {
|
|
109
|
-
return { severity: 'safe' };
|
|
110
|
-
}
|
|
111
|
-
return { severity: 'normal' };
|
|
112
|
-
}
|
|
113
|
-
// Default: normal
|
|
114
|
-
return { severity: 'normal' };
|
|
115
|
-
}
|
|
116
|
-
// =============================================================================
|
|
117
|
-
// WebSocket Client Management
|
|
118
|
-
// =============================================================================
|
|
119
|
-
export function getHookClients() {
|
|
120
|
-
return hookClients;
|
|
121
|
-
}
|
|
122
|
-
export function addHookClient(ws) {
|
|
123
|
-
hookClients.add(ws);
|
|
124
|
-
ws.on('close', () => hookClients.delete(ws));
|
|
125
|
-
}
|
|
126
|
-
/**
|
|
127
|
-
* Broadcast hook request to all connected clients
|
|
128
|
-
*/
|
|
129
|
-
function broadcastHookRequest(data) {
|
|
130
|
-
const message = JSON.stringify(data);
|
|
131
|
-
for (const client of hookClients) {
|
|
132
|
-
if (client.readyState === WebSocket.OPEN) {
|
|
133
|
-
client.send(message);
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
// =============================================================================
|
|
138
|
-
// Approval Resolution
|
|
139
|
-
// =============================================================================
|
|
140
|
-
/**
|
|
141
|
-
* Resolve a pending approval from client response
|
|
142
|
-
*/
|
|
143
|
-
export function resolveApproval(toolId, approved, data) {
|
|
144
|
-
const pending = pendingApprovals.get(toolId);
|
|
145
|
-
if (!pending) {
|
|
146
|
-
return false;
|
|
147
|
-
}
|
|
148
|
-
pending.resolve({
|
|
149
|
-
decision: approved ? 'allow' : 'deny',
|
|
150
|
-
reason: approved ? 'Approved by user' : 'Rejected by user',
|
|
151
|
-
data,
|
|
152
|
-
});
|
|
153
|
-
pendingApprovals.delete(toolId);
|
|
154
|
-
return true;
|
|
155
|
-
}
|
|
156
|
-
/**
|
|
157
|
-
* Handle WebSocket message from client
|
|
158
|
-
*/
|
|
159
|
-
export function handleHookWebSocketMessage(ws, message) {
|
|
160
|
-
try {
|
|
161
|
-
const data = JSON.parse(message);
|
|
162
|
-
if (data.type === 'hook-response') {
|
|
163
|
-
// Store grant if user approved with a grantScope (MSSCI-14321 AC8)
|
|
164
|
-
if (data.approved && data.data?.grantScope) {
|
|
165
|
-
const pending = pendingApprovals.get(data.toolId);
|
|
166
|
-
const scope = pending
|
|
167
|
-
? extractToolScope(pending.toolName, pending.input)
|
|
168
|
-
: '';
|
|
169
|
-
const grant = {
|
|
170
|
-
tool: pending?.toolName || '',
|
|
171
|
-
scope,
|
|
172
|
-
grant_type: data.data.grantScope,
|
|
173
|
-
granted_at: new Date().toISOString(),
|
|
174
|
-
};
|
|
175
|
-
// Include agent from the original request if present
|
|
176
|
-
if (pending?.agent) {
|
|
177
|
-
grant.agent = pending.agent;
|
|
178
|
-
}
|
|
179
|
-
addGrant(grant);
|
|
180
|
-
}
|
|
181
|
-
resolveApproval(data.toolId, data.approved, data.data);
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
catch (error) {
|
|
185
|
-
console.error('[HookRequest] Failed to parse WebSocket message:', error);
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
// =============================================================================
|
|
189
|
-
// Request Handler
|
|
190
|
-
// =============================================================================
|
|
191
|
-
async function handleHookRequest(req, res) {
|
|
192
|
-
const { toolName, toolId, input, sessionId: _sessionId, agent, context } = req.body;
|
|
193
|
-
if (!toolName || !toolId) {
|
|
194
|
-
res.status(400).json({ error: 'Missing required fields: toolName, toolId' });
|
|
195
|
-
return;
|
|
196
|
-
}
|
|
197
|
-
// Check for auto-approval via grants (all tool types)
|
|
198
|
-
const scope = extractToolScope(toolName, input || {});
|
|
199
|
-
if (checkGrant(toolName, scope, agent)) {
|
|
200
|
-
res.json({
|
|
201
|
-
decision: 'allow',
|
|
202
|
-
reason: 'Granted by permission grant',
|
|
203
|
-
});
|
|
204
|
-
return;
|
|
205
|
-
}
|
|
206
|
-
// Check Bash allowlist for backward compatibility
|
|
207
|
-
if (toolName === 'Bash' && isAllowlisted(scope)) {
|
|
208
|
-
res.json({
|
|
209
|
-
decision: 'allow',
|
|
210
|
-
reason: 'Command matches allowlist pattern',
|
|
211
|
-
});
|
|
212
|
-
return;
|
|
213
|
-
}
|
|
214
|
-
// No clients connected - fall through to Claude Code's built-in approval
|
|
215
|
-
if (hookClients.size === 0) {
|
|
216
|
-
res.json({
|
|
217
|
-
decision: 'ask',
|
|
218
|
-
reason: 'No Cyclist clients connected, deferring to Claude Code',
|
|
219
|
-
});
|
|
220
|
-
return;
|
|
221
|
-
}
|
|
222
|
-
// Create pending approval with timeout
|
|
223
|
-
const approvalPromise = new Promise((resolve) => {
|
|
224
|
-
pendingApprovals.set(toolId, {
|
|
225
|
-
resolve,
|
|
226
|
-
toolName,
|
|
227
|
-
input: input || {},
|
|
228
|
-
agent,
|
|
229
|
-
timestamp: Date.now(),
|
|
230
|
-
});
|
|
231
|
-
// Set timeout
|
|
232
|
-
setTimeout(() => {
|
|
233
|
-
if (pendingApprovals.has(toolId)) {
|
|
234
|
-
pendingApprovals.delete(toolId);
|
|
235
|
-
resolve({
|
|
236
|
-
decision: 'ask',
|
|
237
|
-
reason: 'Approval timeout, deferring to Claude Code',
|
|
238
|
-
});
|
|
239
|
-
}
|
|
240
|
-
}, APPROVAL_TIMEOUT_MS);
|
|
241
|
-
});
|
|
242
|
-
// Classify severity before broadcast (MSSCI-14323)
|
|
243
|
-
const { severity, warning } = classifyHookSeverity(toolName, input || {});
|
|
244
|
-
// Broadcast to clients (include context, severity, and agent for UI display)
|
|
245
|
-
broadcastHookRequest({
|
|
246
|
-
type: 'hook-request',
|
|
247
|
-
toolId,
|
|
248
|
-
toolName,
|
|
249
|
-
input: input || {},
|
|
250
|
-
severity,
|
|
251
|
-
warning,
|
|
252
|
-
agent,
|
|
253
|
-
context,
|
|
254
|
-
});
|
|
255
|
-
// Wait for response
|
|
256
|
-
const response = await approvalPromise;
|
|
257
|
-
res.json(response);
|
|
258
|
-
}
|
|
259
|
-
// =============================================================================
|
|
260
|
-
// Router
|
|
261
|
-
// =============================================================================
|
|
262
|
-
export function createHookRequestRouter() {
|
|
263
|
-
const router = Router();
|
|
264
|
-
// POST /api/hook-request - Handle hook approval requests
|
|
265
|
-
router.post('/', handleHookRequest);
|
|
266
|
-
// GET /api/hook-request/pending - List pending approvals (for debugging)
|
|
267
|
-
router.get('/pending', (_req, res) => {
|
|
268
|
-
const pending = Array.from(pendingApprovals.entries()).map(([id, p]) => ({
|
|
269
|
-
toolId: id,
|
|
270
|
-
toolName: p.toolName,
|
|
271
|
-
timestamp: p.timestamp,
|
|
272
|
-
age: Date.now() - p.timestamp,
|
|
273
|
-
}));
|
|
274
|
-
res.json({ pending });
|
|
275
|
-
});
|
|
276
|
-
return router;
|
|
277
|
-
}
|
|
1
|
+
// Re-export from @pennyfarthing/core (Story 98-17)
|
|
2
|
+
export * from '@pennyfarthing/core/dist/server/api/hook-request.js';
|
|
278
3
|
//# sourceMappingURL=hook-request.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hook-request.js","sourceRoot":"","sources":["../../src/api/hook-request.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"hook-request.js","sourceRoot":"","sources":["../../src/api/hook-request.ts"],"names":[],"mappings":"AAAA,mDAAmD;AACnD,cAAc,qDAAqD,CAAC"}
|
package/dist/api/hotspots.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hotspots.d.ts","sourceRoot":"","sources":["../../src/api/hotspots.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hotspots.d.ts","sourceRoot":"","sources":["../../src/api/hotspots.ts"],"names":[],"mappings":"AACA,cAAc,iDAAiD,CAAC"}
|
package/dist/api/hotspots.js
CHANGED
|
@@ -1,62 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { join } from 'path';
|
|
4
|
-
// Create hotspots API router
|
|
5
|
-
export function createHotspotsRouter(getProjectDir) {
|
|
6
|
-
const router = Router();
|
|
7
|
-
// GET /api/hotspots?days=90&repo=pennyfarthing&skip_type=orchestrator
|
|
8
|
-
router.get('/', (req, res) => {
|
|
9
|
-
const projectDir = getProjectDir();
|
|
10
|
-
const days = String(req.query.days || '90');
|
|
11
|
-
const repo = req.query.repo;
|
|
12
|
-
const skipType = req.query.skip_type;
|
|
13
|
-
const args = [
|
|
14
|
-
'-m', 'pennyfarthing_scripts.hotspots',
|
|
15
|
-
'analyze',
|
|
16
|
-
'--format', 'json',
|
|
17
|
-
'--days', days,
|
|
18
|
-
];
|
|
19
|
-
if (repo) {
|
|
20
|
-
args.push('--repo', repo);
|
|
21
|
-
}
|
|
22
|
-
else {
|
|
23
|
-
args.push('--path', projectDir);
|
|
24
|
-
}
|
|
25
|
-
// Forward skip_type values to CLI
|
|
26
|
-
if (skipType) {
|
|
27
|
-
const types = Array.isArray(skipType) ? skipType : [skipType];
|
|
28
|
-
for (const t of types) {
|
|
29
|
-
args.push('--skip-type', String(t));
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
// Find python in the project's pennyfarthing dir
|
|
33
|
-
const pythonPath = join(projectDir, 'pennyfarthing');
|
|
34
|
-
execFile('python3', args, {
|
|
35
|
-
cwd: pythonPath,
|
|
36
|
-
env: { ...process.env, PYTHONPATH: pythonPath },
|
|
37
|
-
timeout: 30000,
|
|
38
|
-
}, (err, stdout, stderr) => {
|
|
39
|
-
if (err) {
|
|
40
|
-
console.error('[Hotspots] Analysis failed:', stderr || err.message);
|
|
41
|
-
res.status(500).json({
|
|
42
|
-
success: false,
|
|
43
|
-
error: stderr || err.message,
|
|
44
|
-
});
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
try {
|
|
48
|
-
const data = JSON.parse(stdout);
|
|
49
|
-
res.json(data);
|
|
50
|
-
}
|
|
51
|
-
catch (parseErr) {
|
|
52
|
-
console.error('[Hotspots] JSON parse failed:', parseErr);
|
|
53
|
-
res.status(500).json({
|
|
54
|
-
success: false,
|
|
55
|
-
error: 'Failed to parse hotspot analysis output',
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
});
|
|
60
|
-
return router;
|
|
61
|
-
}
|
|
1
|
+
// Re-export from @pennyfarthing/core (Story 98-17)
|
|
2
|
+
export * from '@pennyfarthing/core/dist/server/api/hotspots.js';
|
|
62
3
|
//# sourceMappingURL=hotspots.js.map
|
package/dist/api/hotspots.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hotspots.js","sourceRoot":"","sources":["../../src/api/hotspots.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"hotspots.js","sourceRoot":"","sources":["../../src/api/hotspots.ts"],"names":[],"mappings":"AAAA,mDAAmD;AACnD,cAAc,iDAAiD,CAAC"}
|
package/dist/api/identity.d.ts
CHANGED
|
@@ -1,17 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
* Identity API - Get user identity information from CLI tools
|
|
3
|
-
* MSSCI-12469: Stats strip redesign with identity context
|
|
4
|
-
*
|
|
5
|
-
* Returns Jira email and GitHub username from respective CLI configs.
|
|
6
|
-
*/
|
|
7
|
-
import { Router } from 'express';
|
|
8
|
-
export interface IdentityInfo {
|
|
9
|
-
jiraEmail: string | null;
|
|
10
|
-
githubUsername: string | null;
|
|
11
|
-
avatarUrl: string | null;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Create identity API router
|
|
15
|
-
*/
|
|
16
|
-
export declare function createIdentityRouter(): Router;
|
|
1
|
+
export * from '@pennyfarthing/core/dist/server/api/identity.js';
|
|
17
2
|
//# sourceMappingURL=identity.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../../src/api/identity.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../../src/api/identity.ts"],"names":[],"mappings":"AACA,cAAc,iDAAiD,CAAC"}
|
package/dist/api/identity.js
CHANGED
|
@@ -1,79 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
* MSSCI-12469: Stats strip redesign with identity context
|
|
4
|
-
*
|
|
5
|
-
* Returns Jira email and GitHub username from respective CLI configs.
|
|
6
|
-
*/
|
|
7
|
-
import { Router } from 'express';
|
|
8
|
-
import { execSync } from 'child_process';
|
|
9
|
-
/**
|
|
10
|
-
* Get Jira email from jira CLI config
|
|
11
|
-
* Runs: jira me --raw | grep email
|
|
12
|
-
*/
|
|
13
|
-
function getJiraEmail() {
|
|
14
|
-
try {
|
|
15
|
-
// jira me returns JSON with email field
|
|
16
|
-
const output = execSync('jira me --raw 2>/dev/null', {
|
|
17
|
-
encoding: 'utf-8',
|
|
18
|
-
timeout: 5000,
|
|
19
|
-
});
|
|
20
|
-
const data = JSON.parse(output);
|
|
21
|
-
return data.emailAddress || null;
|
|
22
|
-
}
|
|
23
|
-
catch {
|
|
24
|
-
// jira CLI not configured or not installed
|
|
25
|
-
return null;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Get GitHub username from gh CLI config
|
|
30
|
-
* Runs: gh api user
|
|
31
|
-
*/
|
|
32
|
-
function getGithubUsername() {
|
|
33
|
-
try {
|
|
34
|
-
const output = execSync('gh api user 2>/dev/null', {
|
|
35
|
-
encoding: 'utf-8',
|
|
36
|
-
timeout: 5000,
|
|
37
|
-
});
|
|
38
|
-
const data = JSON.parse(output);
|
|
39
|
-
return data.login || null;
|
|
40
|
-
}
|
|
41
|
-
catch {
|
|
42
|
-
// gh CLI not configured or not installed
|
|
43
|
-
return null;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
// Cache identity info (refresh every 5 minutes)
|
|
47
|
-
let cachedIdentity = null;
|
|
48
|
-
let lastFetch = 0;
|
|
49
|
-
const CACHE_TTL = 5 * 60 * 1000; // 5 minutes
|
|
50
|
-
/**
|
|
51
|
-
* Get identity info with caching
|
|
52
|
-
*/
|
|
53
|
-
function getIdentity() {
|
|
54
|
-
const now = Date.now();
|
|
55
|
-
if (cachedIdentity && now - lastFetch < CACHE_TTL) {
|
|
56
|
-
return cachedIdentity;
|
|
57
|
-
}
|
|
58
|
-
const githubUsername = getGithubUsername();
|
|
59
|
-
cachedIdentity = {
|
|
60
|
-
jiraEmail: getJiraEmail(),
|
|
61
|
-
githubUsername,
|
|
62
|
-
avatarUrl: githubUsername ? `https://avatars.githubusercontent.com/${githubUsername}` : null,
|
|
63
|
-
};
|
|
64
|
-
lastFetch = now;
|
|
65
|
-
return cachedIdentity;
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* Create identity API router
|
|
69
|
-
*/
|
|
70
|
-
export function createIdentityRouter() {
|
|
71
|
-
const router = Router();
|
|
72
|
-
// GET /api/identity - Get current user identity
|
|
73
|
-
router.get('/', (_req, res) => {
|
|
74
|
-
const identity = getIdentity();
|
|
75
|
-
res.json(identity);
|
|
76
|
-
});
|
|
77
|
-
return router;
|
|
78
|
-
}
|
|
1
|
+
// Re-export from @pennyfarthing/core (Story 98-17)
|
|
2
|
+
export * from '@pennyfarthing/core/dist/server/api/identity.js';
|
|
79
3
|
//# sourceMappingURL=identity.js.map
|
package/dist/api/identity.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identity.js","sourceRoot":"","sources":["../../src/api/identity.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"identity.js","sourceRoot":"","sources":["../../src/api/identity.ts"],"names":[],"mappings":"AAAA,mDAAmD;AACnD,cAAc,iDAAiD,CAAC"}
|
package/dist/api/index.d.ts
CHANGED
|
@@ -1,35 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export { createPortraitRouter, getCurrentPortrait } from './portrait.js';
|
|
3
|
-
export { createPersonaRouter, broadcastPersona, getPersonaClients, getStreamingState, setStreamingState } from './persona.js';
|
|
4
|
-
export { createGitRouter, getGitInfo, getAllReposGitInfo, getGitInfoAsync, getAllReposGitInfoAsync } from './git.js';
|
|
5
|
-
export type { GitInfo } from './git.js';
|
|
6
|
-
export { createOTLPRouter } from './otlp.js';
|
|
7
|
-
export { createStoryRouter } from './story.js';
|
|
8
|
-
export { createHotspotsRouter } from './hotspots.js';
|
|
9
|
-
export { createFileBrowserRouter } from './file-browser.js';
|
|
10
|
-
export { createTokenStatsRouter, broadcastTokenStats, getTokenStatsClients, initTokenStatsBroadcast } from './token-stats.js';
|
|
11
|
-
export { createContextRouter, getContextUsage } from './context.js';
|
|
12
|
-
export type { ContextInfo } from './context.js';
|
|
13
|
-
export { createThemeAgentsRouter, getThemeAgents } from './theme-agents.js';
|
|
14
|
-
export type { AgentCharacterMap } from './theme-agents.js';
|
|
15
|
-
export { createModeRouter, getModeInfo } from './mode.js';
|
|
16
|
-
export type { ModeInfo } from './mode.js';
|
|
17
|
-
export { createTelemetryRouter } from './telemetry.js';
|
|
18
|
-
export { createEvaluationRouter } from './evaluation.js';
|
|
19
|
-
export { createSettingsRouter } from './settings.js';
|
|
20
|
-
export { createBackgroundTasksRouter, getBackgroundTaskClients, broadcastBackgroundTaskEvent, initBackgroundTaskBroadcast } from './background-tasks.js';
|
|
21
|
-
export { createSpansRouter } from './spans.js';
|
|
22
|
-
export { getBellClients, broadcastBellConsumed } from './bell.js';
|
|
23
|
-
export { createHookRequestRouter, getHookClients, addHookClient, resolveApproval, handleHookWebSocketMessage } from './hook-request.js';
|
|
24
|
-
export { createIdentityRouter } from './identity.js';
|
|
25
|
-
export type { IdentityInfo } from './identity.js';
|
|
26
|
-
export { createTodosRouter, setWebModeTodos, getWebModeTodos } from './todos.js';
|
|
27
|
-
export { createAuditLogRouter } from './audit-log.js';
|
|
28
|
-
export { createPermissionsRouter } from './permissions.js';
|
|
29
|
-
export { createAgentLoadRouter } from './agent-load.js';
|
|
30
|
-
export { createCodeMarkersRouter } from './code-markers.js';
|
|
31
|
-
export { createDeadCodeRouter } from './dead-code.js';
|
|
32
|
-
export { createComplexityRouter } from './complexity.js';
|
|
33
|
-
export { createDependenciesRouter } from './dependencies.js';
|
|
34
|
-
export { createHealthScoreRouter } from './health-score.js';
|
|
1
|
+
export * from '@pennyfarthing/core/dist/server/api/index.js';
|
|
35
2
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/api/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AACA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AACA,cAAc,8CAA8C,CAAC"}
|
package/dist/api/index.js
CHANGED
|
@@ -1,45 +1,3 @@
|
|
|
1
|
-
//
|
|
2
|
-
export
|
|
3
|
-
export { createPortraitRouter, getCurrentPortrait } from './portrait.js';
|
|
4
|
-
export { createPersonaRouter, broadcastPersona, getPersonaClients, getStreamingState, setStreamingState } from './persona.js';
|
|
5
|
-
export { createGitRouter, getGitInfo, getAllReposGitInfo, getGitInfoAsync, getAllReposGitInfoAsync } from './git.js';
|
|
6
|
-
export { createOTLPRouter } from './otlp.js';
|
|
7
|
-
export { createStoryRouter } from './story.js';
|
|
8
|
-
export { createHotspotsRouter } from './hotspots.js';
|
|
9
|
-
export { createFileBrowserRouter } from './file-browser.js';
|
|
10
|
-
export { createTokenStatsRouter, broadcastTokenStats, getTokenStatsClients, initTokenStatsBroadcast } from './token-stats.js';
|
|
11
|
-
export { createContextRouter, getContextUsage } from './context.js';
|
|
12
|
-
export { createThemeAgentsRouter, getThemeAgents } from './theme-agents.js';
|
|
13
|
-
export { createModeRouter, getModeInfo } from './mode.js';
|
|
14
|
-
export { createTelemetryRouter } from './telemetry.js';
|
|
15
|
-
export { createEvaluationRouter } from './evaluation.js';
|
|
16
|
-
// 35-1: Settings API for contextual settings
|
|
17
|
-
export { createSettingsRouter } from './settings.js';
|
|
18
|
-
// 35-16: Background tasks API
|
|
19
|
-
export { createBackgroundTasksRouter, getBackgroundTaskClients, broadcastBackgroundTaskEvent, initBackgroundTaskBroadcast } from './background-tasks.js';
|
|
20
|
-
// MSSCI-11734: Enriched spans API
|
|
21
|
-
export { createSpansRouter } from './spans.js';
|
|
22
|
-
// Bell mode WebSocket broadcast
|
|
23
|
-
export { getBellClients, broadcastBellConsumed } from './bell.js';
|
|
24
|
-
// MSSCI-12409: Hook request API (WheelHub consolidation)
|
|
25
|
-
export { createHookRequestRouter, getHookClients, addHookClient, resolveApproval, handleHookWebSocketMessage } from './hook-request.js';
|
|
26
|
-
// MSSCI-12469: Identity API for stats strip
|
|
27
|
-
export { createIdentityRouter } from './identity.js';
|
|
28
|
-
// Todos API for web mode fallback
|
|
29
|
-
export { createTodosRouter, setWebModeTodos, getWebModeTodos } from './todos.js';
|
|
30
|
-
// Audit log API
|
|
31
|
-
export { createAuditLogRouter } from './audit-log.js';
|
|
32
|
-
// MSSCI-14325: Permissions API (grant management)
|
|
33
|
-
export { createPermissionsRouter } from './permissions.js';
|
|
34
|
-
// MSSCI-14461: Agent Load Analyzer API
|
|
35
|
-
export { createAgentLoadRouter } from './agent-load.js';
|
|
36
|
-
// MSSCI-14456: Code Markers API
|
|
37
|
-
export { createCodeMarkersRouter } from './code-markers.js';
|
|
38
|
-
// MSSCI-14460: Dead Code API
|
|
39
|
-
export { createDeadCodeRouter } from './dead-code.js';
|
|
40
|
-
// MSSCI-14468: Complexity + Dependencies APIs
|
|
41
|
-
export { createComplexityRouter } from './complexity.js';
|
|
42
|
-
export { createDependenciesRouter } from './dependencies.js';
|
|
43
|
-
// MSSCI-14471: Health Score API
|
|
44
|
-
export { createHealthScoreRouter } from './health-score.js';
|
|
1
|
+
// Re-export from @pennyfarthing/core (Story 98-17)
|
|
2
|
+
export * from '@pennyfarthing/core/dist/server/api/index.js';
|
|
45
3
|
//# sourceMappingURL=index.js.map
|
package/dist/api/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,mDAAmD;AACnD,cAAc,8CAA8C,CAAC"}
|