@myagentroam/node 0.9.9 → 0.9.11

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.
Files changed (214) hide show
  1. package/dist/capabilities.js +2 -92
  2. package/dist/claude-agent-sdk.js +2 -330
  3. package/dist/claude-channel.js +2 -44
  4. package/dist/codex-app-server.js +2 -503
  5. package/dist/config.js +2 -56
  6. package/dist/connector/node-connector-options.js +2 -1
  7. package/dist/connector/node-operation-router.js +2 -22
  8. package/dist/connector.js +2 -845
  9. package/dist/control-outbound-scheduler.js +2 -154
  10. package/dist/database.js +2 -1418
  11. package/dist/event-buffer.js +2 -19
  12. package/dist/fake-runner.js +2 -129
  13. package/dist/health.js +2 -3
  14. package/dist/main.js +2 -54
  15. package/dist/migrations/v001.js +3 -144
  16. package/dist/migrations/v002.js +2 -143
  17. package/dist/migrations/v003.js +2 -44
  18. package/dist/migrations/v004.js +34 -30
  19. package/dist/native-jsonl-reader.js +2 -186
  20. package/dist/native-session-history.js +2 -1119
  21. package/dist/opencode-runtime.js +2 -80
  22. package/dist/opencode-server.js +2 -263
  23. package/dist/operational.js +2 -122
  24. package/dist/process-tree.js +2 -18
  25. package/dist/rotating-log.js +2 -67
  26. package/dist/runner/abstract-runner.js +2 -232
  27. package/dist/runner/claude/managed-run-controller.js +2 -345
  28. package/dist/runner/claude-code-runner.js +2 -303
  29. package/dist/runner/codex/composer-image-markers.js +2 -0
  30. package/dist/runner/codex/conversation-parser.js +2 -861
  31. package/dist/runner/codex/managed-run-controller.js +2 -460
  32. package/dist/runner/codex-runner.js +2 -628
  33. package/dist/runner/fake-test-runner.js +2 -47
  34. package/dist/runner/opencode/conversation-parser.js +2 -221
  35. package/dist/runner/opencode/managed-run-controller.js +2 -537
  36. package/dist/runner/opencode-runner.js +2 -448
  37. package/dist/runner/runner-registry.js +2 -90
  38. package/dist/runner-command-engine.js +2 -70
  39. package/dist/runner-profiles.js +2 -215
  40. package/dist/runner-usage.js +2 -190
  41. package/dist/runtime-command-detector.js +2 -73
  42. package/dist/runtime-state.js +2 -982
  43. package/dist/service/attachment-domain-state.js +2 -7
  44. package/dist/service/conversation-history-service.js +2 -457
  45. package/dist/service/conversation-segment-service.js +2 -162
  46. package/dist/service/external-session-resume-service.js +2 -118
  47. package/dist/service/fake-managed-run-service.js +2 -60
  48. package/dist/service/managed-runner-session-service.js +2 -35
  49. package/dist/service/mcp-installation-verifier.js +2 -87
  50. package/dist/service/mcp-node-operation-service.js +2 -90
  51. package/dist/service/mcp-package-installer.js +2 -136
  52. package/dist/service/native-session-projection-service.js +2 -280
  53. package/dist/service/native-session-watch-service.js +2 -383
  54. package/dist/service/node-connection-lifecycle-service.js +2 -84
  55. package/dist/service/node-control-channel.js +2 -85
  56. package/dist/service/node-control-message-service.js +2 -107
  57. package/dist/service/node-request-service.js +2 -52
  58. package/dist/service/node-run-event-bridge.js +2 -83
  59. package/dist/service/node-terminal-channel.js +2 -182
  60. package/dist/service/node-upgrade-coordinator.js +2 -137
  61. package/dist/service/node-workspace-coordinator.js +2 -70
  62. package/dist/service/recent-run-projection-service.js +2 -78
  63. package/dist/service/run-attachment-service.js +2 -194
  64. package/dist/service/run-domain-state.js +2 -4
  65. package/dist/service/run-event-service.js +2 -193
  66. package/dist/service/run-workbench-service.js +2 -104
  67. package/dist/service/runner-channel-message-service.js +2 -20
  68. package/dist/service/runner-interaction-service.js +2 -243
  69. package/dist/service/runner-service.js +2 -71
  70. package/dist/service/session-catalog-service.js +2 -224
  71. package/dist/service/session-command-service.js +2 -76
  72. package/dist/service/session-context-service.js +2 -101
  73. package/dist/service/session-domain-state.js +2 -9
  74. package/dist/service/session-identity-service.js +2 -86
  75. package/dist/service/session-lifecycle-service.js +2 -240
  76. package/dist/service/session-message-service.js +2 -173
  77. package/dist/service/session-presentation-service.js +2 -43
  78. package/dist/service/session-query-service.js +2 -82
  79. package/dist/service/skill-directory-service.js +2 -238
  80. package/dist/service/skill-install-service.js +2 -434
  81. package/dist/service/skill-node-operation-service.js +2 -206
  82. package/dist/service/terminal-relay-state.js +2 -3
  83. package/dist/service/terminal-service.js +2 -52
  84. package/dist/service/workbench-event-service.js +2 -19
  85. package/dist/service/workbench-manifest-service.js +2 -69
  86. package/dist/service/workspace-change-service.js +2 -86
  87. package/dist/service/workspace-content-search-service.js +2 -477
  88. package/dist/service/workspace-domain-state.js +2 -41
  89. package/dist/service/workspace-file-service.js +2 -122
  90. package/dist/service/workspace-git-exclude-service.js +2 -119
  91. package/dist/service/workspace-queue-workbench-service.js +2 -304
  92. package/dist/service/workspace-service.js +2 -69
  93. package/dist/service/workspace-session-service.js +2 -139
  94. package/dist/service/workspace-upload-service.js +2 -262
  95. package/dist/service/workspace-watch-service.js +2 -146
  96. package/dist/service/workspace-workbench-service.js +2 -405
  97. package/dist/service.js +2 -38
  98. package/dist/storage.js +2 -32
  99. package/dist/supervisor.js +2 -136
  100. package/dist/terminal.js +2 -416
  101. package/dist/util/node-operation-parsers.js +2 -382
  102. package/dist/util/personal-instructions.js +2 -31
  103. package/dist/util/runner-error.js +2 -52
  104. package/dist/util/runner-native-session-parsers.js +2 -490
  105. package/dist/util/safe-error.js +2 -5
  106. package/dist/util/secret-environment.js +2 -25
  107. package/dist/workspace.js +2 -1519
  108. package/package.json +3 -3
  109. package/dist/capabilities.d.ts +0 -12
  110. package/dist/claude-agent-sdk.d.ts +0 -92
  111. package/dist/claude-channel.d.ts +0 -28
  112. package/dist/codex-app-server.d.ts +0 -133
  113. package/dist/config.d.ts +0 -18
  114. package/dist/connector/node-connector-options.d.ts +0 -27
  115. package/dist/connector/node-operation-router.d.ts +0 -9
  116. package/dist/connector.d.ts +0 -94
  117. package/dist/control-outbound-scheduler.d.ts +0 -29
  118. package/dist/database.d.ts +0 -305
  119. package/dist/event-buffer.d.ts +0 -9
  120. package/dist/fake-runner.d.ts +0 -42
  121. package/dist/health.d.ts +0 -4
  122. package/dist/main.d.ts +0 -2
  123. package/dist/migrations/v001.d.ts +0 -3
  124. package/dist/migrations/v002.d.ts +0 -4
  125. package/dist/migrations/v003.d.ts +0 -4
  126. package/dist/migrations/v004.d.ts +0 -4
  127. package/dist/native-jsonl-reader.d.ts +0 -35
  128. package/dist/native-session-history.d.ts +0 -126
  129. package/dist/opencode-runtime.d.ts +0 -33
  130. package/dist/opencode-server.d.ts +0 -49
  131. package/dist/operational.d.ts +0 -39
  132. package/dist/process-tree.d.ts +0 -9
  133. package/dist/rotating-log.d.ts +0 -17
  134. package/dist/runner/abstract-runner.d.ts +0 -172
  135. package/dist/runner/claude/managed-run-controller.d.ts +0 -51
  136. package/dist/runner/claude-code-runner.d.ts +0 -72
  137. package/dist/runner/codex/conversation-parser.d.ts +0 -59
  138. package/dist/runner/codex/managed-run-controller.d.ts +0 -90
  139. package/dist/runner/codex-runner.d.ts +0 -103
  140. package/dist/runner/fake-test-runner.d.ts +0 -26
  141. package/dist/runner/opencode/conversation-parser.d.ts +0 -31
  142. package/dist/runner/opencode/managed-run-controller.d.ts +0 -82
  143. package/dist/runner/opencode-runner.d.ts +0 -71
  144. package/dist/runner/runner-registry.d.ts +0 -19
  145. package/dist/runner-command-engine.d.ts +0 -28
  146. package/dist/runner-profiles.d.ts +0 -15
  147. package/dist/runner-usage.d.ts +0 -33
  148. package/dist/runtime-command-detector.d.ts +0 -3
  149. package/dist/runtime-state.d.ts +0 -171
  150. package/dist/service/attachment-domain-state.d.ts +0 -7
  151. package/dist/service/conversation-history-service.d.ts +0 -43
  152. package/dist/service/conversation-segment-service.d.ts +0 -20
  153. package/dist/service/external-session-resume-service.d.ts +0 -34
  154. package/dist/service/fake-managed-run-service.d.ts +0 -28
  155. package/dist/service/managed-runner-session-service.d.ts +0 -12
  156. package/dist/service/mcp-installation-verifier.d.ts +0 -9
  157. package/dist/service/mcp-node-operation-service.d.ts +0 -11
  158. package/dist/service/mcp-package-installer.d.ts +0 -8
  159. package/dist/service/native-session-projection-service.d.ts +0 -52
  160. package/dist/service/native-session-watch-service.d.ts +0 -62
  161. package/dist/service/node-connection-lifecycle-service.d.ts +0 -36
  162. package/dist/service/node-control-channel.d.ts +0 -32
  163. package/dist/service/node-control-message-service.d.ts +0 -27
  164. package/dist/service/node-request-service.d.ts +0 -14
  165. package/dist/service/node-run-event-bridge.d.ts +0 -40
  166. package/dist/service/node-terminal-channel.d.ts +0 -29
  167. package/dist/service/node-upgrade-coordinator.d.ts +0 -29
  168. package/dist/service/node-workspace-coordinator.d.ts +0 -29
  169. package/dist/service/recent-run-projection-service.d.ts +0 -14
  170. package/dist/service/run-attachment-service.d.ts +0 -38
  171. package/dist/service/run-domain-state.d.ts +0 -4
  172. package/dist/service/run-event-service.d.ts +0 -33
  173. package/dist/service/run-workbench-service.d.ts +0 -25
  174. package/dist/service/runner-channel-message-service.d.ts +0 -13
  175. package/dist/service/runner-interaction-service.d.ts +0 -39
  176. package/dist/service/runner-service.d.ts +0 -46
  177. package/dist/service/session-catalog-service.d.ts +0 -45
  178. package/dist/service/session-command-service.d.ts +0 -24
  179. package/dist/service/session-context-service.d.ts +0 -35
  180. package/dist/service/session-domain-state.d.ts +0 -9
  181. package/dist/service/session-identity-service.d.ts +0 -24
  182. package/dist/service/session-lifecycle-service.d.ts +0 -31
  183. package/dist/service/session-message-service.d.ts +0 -33
  184. package/dist/service/session-presentation-service.d.ts +0 -34
  185. package/dist/service/session-query-service.d.ts +0 -35
  186. package/dist/service/skill-directory-service.d.ts +0 -20
  187. package/dist/service/skill-install-service.d.ts +0 -21
  188. package/dist/service/skill-node-operation-service.d.ts +0 -44
  189. package/dist/service/terminal-relay-state.d.ts +0 -6
  190. package/dist/service/terminal-service.d.ts +0 -12
  191. package/dist/service/workbench-event-service.d.ts +0 -9
  192. package/dist/service/workbench-manifest-service.d.ts +0 -90
  193. package/dist/service/workspace-change-service.d.ts +0 -9
  194. package/dist/service/workspace-content-search-service.d.ts +0 -14
  195. package/dist/service/workspace-domain-state.d.ts +0 -79
  196. package/dist/service/workspace-file-service.d.ts +0 -18
  197. package/dist/service/workspace-git-exclude-service.d.ts +0 -4
  198. package/dist/service/workspace-queue-workbench-service.d.ts +0 -86
  199. package/dist/service/workspace-service.d.ts +0 -15
  200. package/dist/service/workspace-session-service.d.ts +0 -23
  201. package/dist/service/workspace-upload-service.d.ts +0 -39
  202. package/dist/service/workspace-watch-service.d.ts +0 -23
  203. package/dist/service/workspace-workbench-service.d.ts +0 -58
  204. package/dist/service.d.ts +0 -4
  205. package/dist/storage.d.ts +0 -2
  206. package/dist/supervisor.d.ts +0 -1
  207. package/dist/terminal.d.ts +0 -133
  208. package/dist/util/node-operation-parsers.d.ts +0 -92
  209. package/dist/util/personal-instructions.d.ts +0 -2
  210. package/dist/util/runner-error.d.ts +0 -6
  211. package/dist/util/runner-native-session-parsers.d.ts +0 -74
  212. package/dist/util/safe-error.d.ts +0 -2
  213. package/dist/util/secret-environment.d.ts +0 -1
  214. package/dist/workspace.d.ts +0 -217
@@ -1,35 +0,0 @@
1
- import type { NodeAgentSession } from '../database.js';
2
- import type { RunnerRegistry } from '../runner/runner-registry.js';
3
- export interface SessionContextUsage {
4
- readonly model: string | null;
5
- readonly usedTokens: number;
6
- readonly maxTokens: number;
7
- readonly percentage: number;
8
- }
9
- export interface SessionContextReadResult {
10
- readonly context: SessionContextUsage | null;
11
- readonly pending: boolean;
12
- }
13
- export interface SessionContextServiceOptions {
14
- readonly runners: RunnerRegistry;
15
- readonly session: (sessionId: string) => NodeAgentSession | undefined;
16
- readonly stopped: () => boolean;
17
- readonly publish: (input: {
18
- sessionId: string;
19
- workspaceId: string;
20
- context: SessionContextUsage;
21
- pending: false;
22
- }) => void;
23
- }
24
- export declare class SessionContextService {
25
- private readonly options;
26
- private readonly snapshots;
27
- private readonly snapshotTimers;
28
- private readonly timers;
29
- private readonly versions;
30
- constructor(options: SessionContextServiceOptions);
31
- read(session: NodeAgentSession): Promise<SessionContextReadResult>;
32
- schedule(sessionId: string): void;
33
- dispose(): void;
34
- private current;
35
- }
@@ -1,9 +0,0 @@
1
- export declare class SessionDomainState<TSession, TActivity> {
2
- readonly directNative: Map<string, TSession>;
3
- readonly externalActivity: Map<string, TActivity>;
4
- readonly resumedByDirectId: Map<string, string>;
5
- readonly resumeFailures: Map<string, string>;
6
- readonly messageResumeFailures: Map<string, string>;
7
- readonly resumeFailureDetails: Map<string, string>;
8
- readonly failureTimers: Map<string, NodeJS.Timeout>;
9
- }
@@ -1,24 +0,0 @@
1
- import type { NodeAgentSession } from '../database.js';
2
- import type { NodeRuntimeState } from '../runtime-state.js';
3
- export interface SessionIdentityServiceOptions {
4
- readonly runtime: NodeRuntimeState;
5
- readonly persist: (session: NodeAgentSession, nativeSessionId: string) => void;
6
- readonly migrateCommands: (previousId: string, nextId: string) => void;
7
- readonly migrateQueue: (previousId: string, nextId: string) => void;
8
- readonly migrateRunnerState: (previousId: string, nextId: string) => void;
9
- readonly emitSession: (session: NodeAgentSession) => void;
10
- readonly emitRun: (run: unknown) => void;
11
- readonly emitQueue: (sessionId: string) => void;
12
- readonly emitTurn: (turn: unknown) => void;
13
- }
14
- export declare class SessionIdentityService {
15
- private readonly options;
16
- readonly bootstrapIds: Set<string>;
17
- private readonly waiters;
18
- constructor(options: SessionIdentityServiceOptions);
19
- markBootstrap(sessionId: string): void;
20
- promote(sessionId: string, nativeSessionId: string): void;
21
- wait(bootstrapSessionId: string): Promise<string>;
22
- reject(sessionId: string, code: string): void;
23
- dispose(): void;
24
- }
@@ -1,31 +0,0 @@
1
- import type { NodeOperationHandler } from '../connector/node-operation-router.js';
2
- import type { NodeAgentSession, NodeDatabase } from '../database.js';
3
- import type { NodeRuntimeState } from '../runtime-state.js';
4
- import type { RunnerRegistry } from '../runner/runner-registry.js';
5
- import type { NativeSessionProjectionService } from './native-session-projection-service.js';
6
- import type { SessionIdentityService } from './session-identity-service.js';
7
- interface SessionLifecycleServiceOptions {
8
- readonly database: () => NodeDatabase;
9
- readonly runtime: NodeRuntimeState;
10
- readonly runners: RunnerRegistry;
11
- readonly projection: NativeSessionProjectionService;
12
- readonly identity: SessionIdentityService;
13
- readonly present: (session: NodeAgentSession) => unknown;
14
- readonly emitSession: (session: NodeAgentSession) => void;
15
- readonly execute: (operation: string, data: Record<string, unknown>) => Promise<unknown>;
16
- readonly interceptedSessionId: (clientMessageId: string) => string | undefined;
17
- }
18
- export declare class SessionLifecycleService {
19
- private readonly options;
20
- private readonly starts;
21
- constructor(options: SessionLifecycleServiceOptions);
22
- operations(): Readonly<Record<string, NodeOperationHandler>>;
23
- clear(): void;
24
- private updateMetadata;
25
- private movePin;
26
- private create;
27
- private updateConfiguration;
28
- private start;
29
- private startFresh;
30
- }
31
- export {};
@@ -1,33 +0,0 @@
1
- import type { NodeOperationHandler } from '../connector/node-operation-router.js';
2
- import type { NodeAgentSession } from '../database.js';
3
- import type { NodeRuntimeState } from '../runtime-state.js';
4
- import type { CommandStateStore } from '../runner-command-engine.js';
5
- import type { RunnerRegistry } from '../runner/runner-registry.js';
6
- import type { WorkspaceUploadService } from './workspace-upload-service.js';
7
- import type { RunnerImageAttachment, RunAttachmentService } from './run-attachment-service.js';
8
- import type { RunnerInteractionService } from './runner-interaction-service.js';
9
- import type { WorkspaceQueueWorkbenchService } from './workspace-queue-workbench-service.js';
10
- interface SessionMessageServiceOptions {
11
- readonly runtime: NodeRuntimeState;
12
- readonly uploads: WorkspaceUploadService;
13
- readonly attachments: RunAttachmentService;
14
- readonly commands: CommandStateStore;
15
- readonly queue: WorkspaceQueueWorkbenchService<RunnerImageAttachment>;
16
- readonly interaction: RunnerInteractionService;
17
- readonly runners: RunnerRegistry;
18
- readonly resolve: (sessionId: string) => Promise<NodeAgentSession>;
19
- readonly present: (session: NodeAgentSession) => unknown;
20
- readonly emitSession: (session: NodeAgentSession) => void;
21
- readonly channelToken: (sessionId: string) => string | undefined;
22
- }
23
- export declare class SessionMessageService {
24
- private readonly options;
25
- private readonly pendingMessages;
26
- constructor(options: SessionMessageServiceOptions);
27
- operations(): Readonly<Record<string, NodeOperationHandler>>;
28
- private message;
29
- private persistAttachments;
30
- private channelMessage;
31
- private channelToken;
32
- }
33
- export {};
@@ -1,34 +0,0 @@
1
- import type { NodeCapabilities, SessionActivityState, RunnerCommandState } from '@myagentroam/protocol';
2
- import type { CodexSessionControl } from '../codex-app-server.js';
3
- import type { NodeAgentSession, NodeDatabase } from '../database.js';
4
- import type { NodeRuntimeState } from '../runtime-state.js';
5
- import type { CommandStateStore } from '../runner-command-engine.js';
6
- import type { RunnerRegistry } from '../runner/runner-registry.js';
7
- export type PresentedSession = NodeAgentSession & {
8
- readonly control: CodexSessionControl;
9
- readonly activity: SessionActivityState;
10
- readonly runtime: {
11
- readonly level: CodexSessionControl['level'];
12
- readonly capabilities: readonly string[];
13
- readonly reasonCode: string | null;
14
- };
15
- readonly commandStates: readonly RunnerCommandState[];
16
- };
17
- interface SessionPresentationServiceOptions {
18
- readonly database: () => NodeDatabase | undefined;
19
- readonly runtime: NodeRuntimeState;
20
- readonly commands: CommandStateStore;
21
- readonly runners: RunnerRegistry;
22
- readonly capabilities: () => NodeCapabilities;
23
- readonly hasManagedActiveRun: (session: NodeAgentSession) => boolean;
24
- readonly externalActivity: (sessionId: string) => SessionActivityState | undefined;
25
- readonly projectionForNative: (session: NodeAgentSession) => NodeAgentSession | undefined;
26
- }
27
- export declare class SessionPresentationService {
28
- private readonly options;
29
- constructor(options: SessionPresentationServiceOptions);
30
- present(session: NodeAgentSession): PresentedSession;
31
- presentDiscovered(sessions: readonly NodeAgentSession[]): readonly PresentedSession[];
32
- }
33
- export declare function latestSessionActivityAt(current: number, discovered: number): number;
34
- export {};
@@ -1,35 +0,0 @@
1
- import type { NodeOperationHandler } from '../connector/node-operation-router.js';
2
- import type { NodeAgentSession } from '../database.js';
3
- import type { NodeRuntimeState } from '../runtime-state.js';
4
- import type { RunnerRegistry } from '../runner/runner-registry.js';
5
- import type { SessionContextService } from './session-context-service.js';
6
- import type { RunnerName } from '@myagentroam/protocol';
7
- export interface SessionQueryServiceOptions {
8
- readonly runtime: NodeRuntimeState;
9
- readonly runners: RunnerRegistry;
10
- readonly resolve: (sessionId: string) => Promise<NodeAgentSession | undefined>;
11
- readonly present: (session: NodeAgentSession) => unknown;
12
- readonly history: (session: NodeAgentSession, input: {
13
- readonly cursor?: string;
14
- readonly limit?: number;
15
- }) => Promise<unknown>;
16
- readonly segments: (session: NodeAgentSession, input: {
17
- readonly cursor?: string;
18
- readonly limit?: number;
19
- }) => Promise<unknown>;
20
- readonly context: SessionContextService;
21
- readonly discover: (runner: RunnerName, workspaceId?: string) => Promise<readonly NodeAgentSession[]>;
22
- readonly workspaceIdForCwd: (cwd: string) => string | undefined;
23
- }
24
- export declare class SessionQueryService {
25
- private readonly options;
26
- constructor(options: SessionQueryServiceOptions);
27
- operations(): Readonly<Record<string, NodeOperationHandler>>;
28
- private get;
29
- private runs;
30
- private turns;
31
- private events;
32
- private readContext;
33
- private discover;
34
- private requireSession;
35
- }
@@ -1,20 +0,0 @@
1
- import { type SkillInstallMetadata } from '@myagentroam/protocol';
2
- export type LocalSkillStatus = 'VALID' | 'UNKNOWN_VERSION' | 'PARTIAL' | 'INVALID' | 'INVALID_LINK' | 'GIT_EXCLUDE_BROKEN';
3
- export interface LocalSkillInspection {
4
- readonly name: string;
5
- readonly description: string;
6
- readonly localStatus: LocalSkillStatus;
7
- readonly skillFilePath: string;
8
- readonly install?: SkillInstallMetadata;
9
- }
10
- export interface LocalSkillTargetInspection {
11
- readonly targetKind: 'NODE' | 'WORKSPACE';
12
- readonly compatibilityMode: 'SYMLINK' | 'JUNCTION' | 'MANAGED_COPY' | 'UNAVAILABLE';
13
- readonly skills: readonly LocalSkillInspection[];
14
- }
15
- export declare class SkillDirectoryService {
16
- inspectNodeHome(home: string, options?: {
17
- readonly includeClaudeCompatibility?: boolean;
18
- }): Promise<LocalSkillTargetInspection>;
19
- inspectWorkspace(workspace: string): Promise<LocalSkillTargetInspection>;
20
- }
@@ -1,21 +0,0 @@
1
- import { type SkillInstallMetadata } from '@myagentroam/protocol';
2
- export interface SkillBundleFile {
3
- readonly path: string;
4
- readonly contentBase64: string;
5
- }
6
- export interface InstallableSkillBundle {
7
- readonly schemaVersion: 1;
8
- readonly files: readonly SkillBundleFile[];
9
- }
10
- export declare class SkillInstallService {
11
- recoverNodeHome(home: string): Promise<void>;
12
- recoverWorkspace(workspace: string): Promise<void>;
13
- installNodeHome(home: string, name: string, bundle: InstallableSkillBundle, metadata: SkillInstallMetadata): Promise<void>;
14
- installWorkspace(workspace: string, name: string, bundle: InstallableSkillBundle, metadata: SkillInstallMetadata, options?: {
15
- readonly confirmTracked?: boolean;
16
- }): Promise<void>;
17
- removeWorkspace(workspace: string, name: string): Promise<void>;
18
- removeNodeHome(home: string, name: string): Promise<void>;
19
- repairWorkspaceGitExclude(workspace: string): Promise<void>;
20
- }
21
- export declare function workspaceSkillTracked(workspace: string, name: string): Promise<boolean>;
@@ -1,44 +0,0 @@
1
- import type { NodeConfig } from '../config.js';
2
- import type { NodeDatabase } from '../database.js';
3
- export declare class SkillNodeOperationService {
4
- private readonly database;
5
- private readonly config;
6
- private readonly directories;
7
- private readonly installer;
8
- private readonly activeTargets;
9
- private readonly jobs;
10
- constructor(database: () => NodeDatabase, config: () => NodeConfig);
11
- operations(): {
12
- 'node.skills.inspect': (data: unknown) => Promise<import("./skill-directory-service.js").LocalSkillTargetInspection>;
13
- 'node.skills.install': (data: unknown) => Promise<{
14
- accepted: boolean;
15
- installJobId: `${string}-${string}-${string}-${string}-${string}`;
16
- }>;
17
- 'node.skills.remove': (data: unknown) => Promise<{
18
- removed: boolean;
19
- }>;
20
- 'workspace.skills.inspect': (data: unknown) => Promise<import("./skill-directory-service.js").LocalSkillTargetInspection>;
21
- 'workspace.skills.install': (data: unknown) => Promise<{
22
- accepted: boolean;
23
- installJobId: `${string}-${string}-${string}-${string}-${string}`;
24
- }>;
25
- 'workspace.skills.remove': (data: unknown) => Promise<{
26
- removed: boolean;
27
- }>;
28
- 'workspace.skills.git-exclude-repair': (data: unknown) => Promise<{
29
- repaired: boolean;
30
- }>;
31
- 'skill.install.job.get': (data: unknown) => {
32
- errorCode?: string;
33
- installJobId: string;
34
- status: "RUNNING" | "SUCCEEDED" | "FAILED";
35
- };
36
- };
37
- private install;
38
- private job;
39
- private cleanupJobs;
40
- private performInstall;
41
- private remove;
42
- private workspacePath;
43
- private download;
44
- }
@@ -1,6 +0,0 @@
1
- export declare class TerminalRelayState {
2
- readonly attachments: Map<string, {
3
- readonly attachmentId: string;
4
- readonly terminalId: string;
5
- }>;
6
- }
@@ -1,12 +0,0 @@
1
- import type { NodeDatabase } from '../database.js';
2
- import type { NodeOperationHandler } from '../connector/node-operation-router.js';
3
- import type { TerminalManager } from '../terminal.js';
4
- export declare class TerminalService {
5
- private readonly database;
6
- private readonly terminalManager;
7
- constructor(database: () => NodeDatabase, terminalManager: TerminalManager);
8
- operations(): Readonly<Record<string, NodeOperationHandler>>;
9
- private open;
10
- private close;
11
- private authorizeAttach;
12
- }
@@ -1,9 +0,0 @@
1
- import { type NodeEnvelope, type WorkbenchEventCategory } from '@myagentroam/protocol';
2
- export declare class WorkbenchEventService {
3
- private readonly send;
4
- private readonly accepts;
5
- private sequence;
6
- constructor(send: (envelope: NodeEnvelope) => void, accepts: (category: WorkbenchEventCategory, payload: unknown) => boolean);
7
- emit(category: WorkbenchEventCategory, payload: unknown): void;
8
- snapshotSequence(): number;
9
- }
@@ -1,90 +0,0 @@
1
- import type { NodeCapabilities } from '@myagentroam/protocol';
2
- import type { TerminalManager } from '../terminal.js';
3
- import type { RunnerService } from './runner-service.js';
4
- interface WorkbenchManifestServiceOptions {
5
- readonly capabilities: () => NodeCapabilities;
6
- readonly runners: RunnerService;
7
- readonly terminals: TerminalManager;
8
- }
9
- /** Builds the capability-driven Workbench contract exposed by this Node. */
10
- export declare class WorkbenchManifestService {
11
- private readonly options;
12
- constructor(options: WorkbenchManifestServiceOptions);
13
- read(): Promise<{
14
- manifestVersion: 1;
15
- revision: number;
16
- observedAt: number;
17
- platform: "linux" | "windows";
18
- architecture: string;
19
- conversation: {
20
- available: boolean;
21
- reasonCode: null;
22
- itemVersions: number[];
23
- supportsSessionCursor: boolean;
24
- supportsHistoryPaging: boolean;
25
- supportsItemFinalSnapshots: boolean;
26
- maxPageSize: number;
27
- };
28
- runners: readonly {
29
- runner: "codex" | "claude-code" | "opencode";
30
- capabilities: string[];
31
- models: {
32
- id: string;
33
- label: string;
34
- supportedEfforts: string[];
35
- isDefault?: boolean | undefined;
36
- defaultEffort?: string | undefined;
37
- }[];
38
- accessOptions: {
39
- id: string;
40
- description: string;
41
- label: string;
42
- }[];
43
- commands: {
44
- id: string;
45
- description: string;
46
- available: boolean;
47
- runner: "codex" | "claude-code" | "opencode";
48
- reasonCode: string | null;
49
- label: string;
50
- inputHint: string;
51
- source: "CODEX_APP_SERVER" | "CLAUDE_AGENT_SDK" | "OPENCODE_SERVER";
52
- interaction: "RUNNER_TEXT" | "IMMEDIATE_ACTION" | "TOGGLE" | "VALUE";
53
- stateLabel?: string | undefined;
54
- }[];
55
- }[];
56
- files: {
57
- available: boolean;
58
- reasonCode: null;
59
- supportsList: boolean;
60
- supportsReadRange: boolean;
61
- supportsSearch: boolean;
62
- maxDirectoryPageSize: number;
63
- maxReadBytes: number;
64
- maxSearchResults: number;
65
- };
66
- git: {
67
- available: boolean;
68
- reasonCode: null;
69
- supportsCurrentChanges: boolean;
70
- supportsTurnChanges: boolean;
71
- supportsHistory: boolean;
72
- maxDiffBytes: number;
73
- };
74
- terminal: {
75
- profiles: readonly Pick<import("../terminal.js").TerminalProfile, "id" | "label" | "isDefault">[];
76
- maxTerminals: number;
77
- maxTerminalsPerWorkspace: number;
78
- maxReplayBytes: number;
79
- reconnectWindowMs: number;
80
- available: boolean;
81
- reasonCode: null;
82
- supportsPty: boolean;
83
- supportsConPty: boolean;
84
- supportsReplay: boolean;
85
- supportsReadonlyAttach: boolean;
86
- supportsTakeover: boolean;
87
- };
88
- }>;
89
- }
90
- export {};
@@ -1,9 +0,0 @@
1
- import type { NodeWorkspace } from '../database.js';
2
- import { WorkspaceDomainState } from './workspace-domain-state.js';
3
- export declare class WorkspaceChangeService {
4
- private readonly state;
5
- constructor(state: WorkspaceDomainState);
6
- invalidate(workspaceId: string): void;
7
- clear(): void;
8
- current(workspace: NodeWorkspace): Promise<unknown>;
9
- }
@@ -1,14 +0,0 @@
1
- import type { WorkspaceContentSearch } from '@myagentroam/protocol';
2
- import type { NodeWorkspace } from '../database.js';
3
- import type { WorkspaceFileService } from './workspace-file-service.js';
4
- export declare class WorkspaceContentSearchService {
5
- private readonly files;
6
- private readonly platform;
7
- private readonly pending;
8
- constructor(files: WorkspaceFileService, platform?: NodeJS.Platform);
9
- search(workspace: NodeWorkspace, input: Record<string, unknown>): Promise<WorkspaceContentSearch>;
10
- private perform;
11
- private engines;
12
- private candidates;
13
- private nativeSearch;
14
- }
@@ -1,79 +0,0 @@
1
- import type { FileHandle } from 'node:fs/promises';
2
- import type { NodeAgentSession } from '../database.js';
3
- import type { WorkspaceFileIndex } from '../workspace.js';
4
- export interface WorkspaceWatch {
5
- readonly workspaceId: string;
6
- readonly watchId: string;
7
- readonly sessionHash: string;
8
- readonly workbenchConnectionId: string;
9
- readonly nodeGeneration: string;
10
- expiresAt: number;
11
- readonly topics: {
12
- readonly sessions: boolean;
13
- readonly changes: boolean;
14
- readonly files: {
15
- readonly path: string;
16
- readonly cursor?: string;
17
- readonly limit?: number;
18
- } | undefined;
19
- };
20
- timer: NodeJS.Timeout;
21
- }
22
- export interface ActiveWorkspaceUpload {
23
- readonly id: string;
24
- readonly workspaceId: string;
25
- readonly path: string;
26
- readonly targetPath: string;
27
- readonly temporaryPath: string;
28
- readonly size: number;
29
- readonly overwrite: boolean;
30
- readonly composerAttachment?: {
31
- readonly id: string;
32
- readonly name: string;
33
- readonly mime: string;
34
- };
35
- readonly handle: FileHandle;
36
- receivedBytes: number;
37
- readonly timer: NodeJS.Timeout;
38
- }
39
- export interface CompletedComposerAttachment {
40
- readonly id: string;
41
- readonly workspaceId: string;
42
- readonly path: string;
43
- readonly targetPath: string;
44
- readonly name: string;
45
- readonly mime: string;
46
- readonly size: number;
47
- readonly timer: NodeJS.Timeout;
48
- }
49
- export declare class WorkspaceDomainState {
50
- readonly uploads: Map<string, ActiveWorkspaceUpload>;
51
- readonly composerAttachments: Map<string, CompletedComposerAttachment>;
52
- readonly changesReads: Map<string, Promise<unknown>>;
53
- readonly changesCache: Map<string, {
54
- readonly value: unknown;
55
- readonly expiresAt: number;
56
- }>;
57
- readonly changesVersions: Map<string, number>;
58
- readonly fileIndexes: Map<string, WorkspaceFileIndex>;
59
- readonly watches: Map<string, Map<string, WorkspaceWatch>>;
60
- readonly watchRevisions: Map<string, number>;
61
- watchSnapshotSequence: number;
62
- readonly sessionWatchTimers: Map<string, NodeJS.Timeout>;
63
- readonly sessionWatchSignatures: Map<string, string>;
64
- readonly sessionWatchReads: Map<string, Promise<void>>;
65
- readonly sessionCache: Map<string, {
66
- readonly sessions: readonly NodeAgentSession[];
67
- readonly expiresAt: number;
68
- }>;
69
- readonly sessionCacheReads: Map<string, Promise<readonly NodeAgentSession[]>>;
70
- readonly changesLimiter: AsyncLimiter;
71
- }
72
- declare class AsyncLimiter {
73
- private readonly limit;
74
- private active;
75
- private readonly waiters;
76
- constructor(limit: number);
77
- run<T>(task: () => Promise<T>): Promise<T>;
78
- }
79
- export {};
@@ -1,18 +0,0 @@
1
- import type { NodeWorkspace } from '../database.js';
2
- import { WorkspaceFileIndex } from '../workspace.js';
3
- import { WorkspaceDomainState } from './workspace-domain-state.js';
4
- export declare class WorkspaceFileService {
5
- private readonly state;
6
- private readonly allowedRoots;
7
- private readonly onInvalidated;
8
- private readonly mutationTails;
9
- constructor(state: WorkspaceDomainState, allowedRoots: () => readonly string[], onInvalidated: (workspaceId: string) => void);
10
- list(workspace: NodeWorkspace, input: Record<string, unknown>): Promise<unknown>;
11
- read(workspace: NodeWorkspace, input: Record<string, unknown>): Promise<unknown>;
12
- readContent(workspace: NodeWorkspace, input: Record<string, unknown>): Promise<unknown>;
13
- search(workspace: NodeWorkspace, input: Record<string, unknown>): Promise<unknown>;
14
- mutate(workspace: NodeWorkspace, input: Record<string, unknown>): Promise<unknown>;
15
- private serializeMutation;
16
- index(workspace: NodeWorkspace): WorkspaceFileIndex;
17
- dispose(workspaceId?: string): void;
18
- }
@@ -1,4 +0,0 @@
1
- export declare function ensureWorkspaceGitExclude(workspace: string): Promise<void>;
2
- export declare function updateWorkspaceSkillGitExclude(workspace: string, name: string, add: boolean): Promise<void>;
3
- export declare function rewriteWorkspaceGitExclude(workspace: string, names: ReadonlySet<string>): Promise<void>;
4
- export declare function hasBrokenWorkspaceSkillGitExclude(workspace: string, names: readonly string[]): Promise<boolean>;
@@ -1,86 +0,0 @@
1
- import type { NodeOperationHandler } from '../connector/node-operation-router.js';
2
- import type { NodeRuntimeState } from '../runtime-state.js';
3
- import type { RunnerName } from '@myagentroam/protocol';
4
- import type { NodeAgentRun, NodeMcpInstallation, NodeMessageAttachmentInput } from '../database.js';
5
- export interface QueuedRunStart<TAttachment = unknown> {
6
- readonly runId: string;
7
- readonly sessionId: string;
8
- readonly workspaceId: string;
9
- readonly runner: RunnerName;
10
- readonly input: string;
11
- readonly attachments: readonly TAttachment[];
12
- readonly attachmentPaths: readonly string[];
13
- readonly cwd: string;
14
- readonly externalSessionId: string | null;
15
- readonly model: string | null;
16
- readonly effort: string | null;
17
- readonly access: string | null;
18
- readonly collaborationMode: 'default' | 'plan';
19
- readonly serviceTier?: 'fast';
20
- readonly secretEnvironment: Readonly<Record<string, string>>;
21
- readonly personalInstructions?: string;
22
- }
23
- interface EnqueuedRunDisposition {
24
- readonly runId: string;
25
- readonly intent: 'SEND' | 'QUEUE' | 'REPLACE_CURRENT';
26
- readonly queueBefore: {
27
- readonly paused: boolean;
28
- readonly runIds: readonly string[];
29
- };
30
- readonly leaseWasActive: boolean;
31
- readonly activeRunId?: string;
32
- }
33
- export interface WorkspaceQueueWorkbenchServiceOptions {
34
- readonly runtime: NodeRuntimeState;
35
- readonly emit: (workspaceId: string, sessionId: string) => void;
36
- readonly clearImages: (runId: string) => void;
37
- readonly cleanupAttachments: (runId: string) => void;
38
- readonly emitRun: (runId: string, eventType: string, payload: unknown, status?: 'FAILED' | 'CANCELLED') => void;
39
- readonly emitConversation: (turn: unknown) => void;
40
- readonly control: (operation: string, payload: Record<string, unknown>) => void;
41
- readonly stopped: () => boolean;
42
- readonly markInterrupted: (runId: string) => void;
43
- readonly prepareInput: (runner: RunnerName, input: string, collaborationMode: 'default' | 'plan') => string;
44
- readonly mcps: (workspaceId: string) => readonly NodeMcpInstallation[];
45
- }
46
- export declare class WorkspaceQueueWorkbenchService<TAttachment> {
47
- private readonly options;
48
- private readonly starts;
49
- private readonly scheduledSessions;
50
- constructor(options: WorkspaceQueueWorkbenchServiceOptions);
51
- enqueue(start: QueuedRunStart<TAttachment>, message: {
52
- readonly runId: string;
53
- readonly sessionId: string;
54
- readonly clientMessageId: string;
55
- readonly content: string;
56
- readonly initiatedByUserId?: number;
57
- readonly attachments?: readonly NodeMessageAttachmentInput[];
58
- }): {
59
- readonly run: NodeAgentRun;
60
- readonly created: boolean;
61
- };
62
- pending(runId: string): QueuedRunStart<TAttachment> | undefined;
63
- remove(runId: string): void;
64
- clear(): void;
65
- publish(sessionId: string): void;
66
- migrateSession(previousId: string, nextId: string): void;
67
- cancelQueued(runId: string): void;
68
- pauseForInterrupt(sessionId: string): void;
69
- resumeAfterCommandRun(sessionId: string): void;
70
- operations(): Readonly<Record<string, NodeOperationHandler>>;
71
- private get;
72
- private pauseOrResume;
73
- private reorder;
74
- private update;
75
- private delete;
76
- private execute;
77
- private requireSession;
78
- private requireRun;
79
- replace(queuedRunId: string, activeRunId: string, prioritize?: boolean): void;
80
- schedule(sessionId: string): void;
81
- settleEnqueue(input: EnqueuedRunDisposition): 'STARTED' | 'QUEUED' | 'RESTARTING';
82
- dispatch(sessionId: string): Promise<void>;
83
- present(workspaceId: string, sessionId: string): unknown;
84
- private updatePending;
85
- }
86
- export {};
@@ -1,15 +0,0 @@
1
- import type { NodeConfig } from '../config.js';
2
- import type { NodeOperationHandler } from '../connector/node-operation-router.js';
3
- import type { NodeDatabase } from '../database.js';
4
- import type { NodeRuntimeState } from '../runtime-state.js';
5
- export declare class WorkspaceService {
6
- private readonly database;
7
- private readonly config;
8
- private readonly runtime;
9
- private readonly onRemoved;
10
- constructor(database: () => NodeDatabase, config: () => NodeConfig, runtime: NodeRuntimeState, onRemoved: (workspaceId: string) => void);
11
- operations(): Readonly<Record<string, NodeOperationHandler>>;
12
- private register;
13
- private listDirectories;
14
- private remove;
15
- }