@serviceme/devtools-protocol 0.0.6 → 0.1.2
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/index.d.mts +237 -126
- package/dist/index.d.ts +237 -126
- package/dist/index.js +142 -97
- package/dist/index.mjs +129 -84
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
type ServicemeErrorCode = "protocol_mismatch" | "cli_not_found" | "cli_start_failed" | "command_timeout" | "request_cancelled" | "invalid_params" | "opencode_not_installed" | "opencode_startup_timeout" | "opencode_request_failed" | "opencode_backend_not_running" | "opencode_session_not_found" | "json_invalid_input" | "env_tool_not_found" | "internal_error";
|
|
2
|
-
declare const SERVICEME_ERROR_CODES: readonly ["protocol_mismatch", "cli_not_found", "cli_start_failed", "command_timeout", "request_cancelled", "invalid_params", "opencode_not_installed", "opencode_startup_timeout", "opencode_request_failed", "opencode_backend_not_running", "opencode_session_not_found", "json_invalid_input", "env_tool_not_found", "internal_error"];
|
|
1
|
+
type ServicemeErrorCode = "protocol_mismatch" | "cli_not_found" | "cli_start_failed" | "command_timeout" | "request_cancelled" | "invalid_params" | "opencode_not_installed" | "opencode_startup_timeout" | "opencode_request_failed" | "opencode_backend_not_running" | "opencode_session_not_found" | "copilot_not_installed" | "copilot_auth_required" | "copilot_execution_failed" | "copilot_timeout" | "json_invalid_input" | "env_tool_not_found" | "task_not_found" | "task_already_exists" | "invalid_schedule" | "invalid_payload" | "confirmation_required" | "workspace_not_found" | "daemon_not_running" | "executor_timeout" | "executor_error" | "task_already_running" | "internal_error";
|
|
2
|
+
declare const SERVICEME_ERROR_CODES: readonly ["protocol_mismatch", "cli_not_found", "cli_start_failed", "command_timeout", "request_cancelled", "invalid_params", "opencode_not_installed", "opencode_startup_timeout", "opencode_request_failed", "opencode_backend_not_running", "opencode_session_not_found", "copilot_not_installed", "copilot_auth_required", "copilot_execution_failed", "copilot_timeout", "json_invalid_input", "env_tool_not_found", "task_not_found", "task_already_exists", "invalid_schedule", "invalid_payload", "confirmation_required", "workspace_not_found", "daemon_not_running", "executor_timeout", "executor_error", "task_already_running", "internal_error"];
|
|
3
3
|
interface ServicemeErrorDetails {
|
|
4
4
|
code: ServicemeErrorCode;
|
|
5
5
|
message: string;
|
|
@@ -24,59 +24,200 @@ declare class ServicemeProtocolError extends Error {
|
|
|
24
24
|
declare function createServicemeError(code: ServicemeErrorCode, message: string, details?: unknown): ServicemeProtocolError;
|
|
25
25
|
declare function normalizeServicemeError(error: unknown, fallbackCode?: ServicemeErrorCode): ServicemeErrorDetails;
|
|
26
26
|
|
|
27
|
-
type
|
|
28
|
-
interface
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
type ScheduledTaskType = "shell" | "http_request" | "github_copilot_cli";
|
|
28
|
+
interface ShellPayload {
|
|
29
|
+
script: string;
|
|
30
|
+
cwd?: string;
|
|
31
|
+
/** Timeout in seconds. Default: 60 */
|
|
32
|
+
timeout?: number;
|
|
33
|
+
}
|
|
34
|
+
interface HttpRequestPayload {
|
|
35
|
+
url: string;
|
|
36
|
+
method: string;
|
|
37
|
+
headers?: Record<string, string>;
|
|
38
|
+
body?: string;
|
|
39
|
+
/** Timeout in seconds. Default: 30 */
|
|
40
|
+
timeout?: number;
|
|
41
|
+
}
|
|
42
|
+
interface GithubCopilotCliPayload {
|
|
43
|
+
prompt: string;
|
|
44
|
+
workspace?: string;
|
|
45
|
+
autopilot?: boolean;
|
|
46
|
+
allowTools?: string[];
|
|
47
|
+
/** Timeout in seconds. Default: 300 */
|
|
48
|
+
timeout?: number;
|
|
49
|
+
model?: string;
|
|
50
|
+
agent?: string;
|
|
51
|
+
}
|
|
52
|
+
type TaskPayload = ShellPayload | HttpRequestPayload | GithubCopilotCliPayload;
|
|
53
|
+
interface ScheduledTask {
|
|
54
|
+
id: string;
|
|
55
|
+
name: string;
|
|
56
|
+
description?: string;
|
|
57
|
+
enabled: boolean;
|
|
58
|
+
scheduleType: "cron" | "interval";
|
|
59
|
+
schedule: string;
|
|
60
|
+
taskType: ScheduledTaskType;
|
|
61
|
+
payload: TaskPayload;
|
|
62
|
+
createdAt: string;
|
|
63
|
+
updatedAt: string;
|
|
64
|
+
}
|
|
65
|
+
interface ScheduledTasksConfig {
|
|
66
|
+
version: 1;
|
|
67
|
+
tasks: ScheduledTask[];
|
|
68
|
+
}
|
|
69
|
+
type TaskExecutionStatus = "running" | "success" | "failure" | "timeout" | "cancelled";
|
|
70
|
+
interface TaskExecutionLog {
|
|
71
|
+
id: string;
|
|
72
|
+
taskId: string;
|
|
73
|
+
taskName: string;
|
|
74
|
+
startedAt: string;
|
|
75
|
+
finishedAt: string;
|
|
76
|
+
status: Exclude<TaskExecutionStatus, "running">;
|
|
77
|
+
output?: string;
|
|
78
|
+
error?: string;
|
|
79
|
+
}
|
|
80
|
+
interface ScheduledTasksLogFile {
|
|
81
|
+
logs: TaskExecutionLog[];
|
|
82
|
+
}
|
|
83
|
+
type ConcurrencyPolicy = "reject" | "parallel";
|
|
84
|
+
type TaskTriggerType = "manual" | "schedule";
|
|
85
|
+
interface TaskExecutionSnapshot {
|
|
86
|
+
executionId: string;
|
|
87
|
+
taskId: string;
|
|
88
|
+
name: string;
|
|
89
|
+
type: ScheduledTaskType;
|
|
90
|
+
payload: TaskPayload;
|
|
91
|
+
workspacePath: string;
|
|
92
|
+
timeoutMs?: number;
|
|
93
|
+
concurrencyPolicy?: ConcurrencyPolicy;
|
|
94
|
+
metadata?: {
|
|
95
|
+
trigger: TaskTriggerType;
|
|
96
|
+
requestedAt: string;
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
interface TaskExecuteResult {
|
|
100
|
+
executionId: string;
|
|
101
|
+
accepted: true;
|
|
102
|
+
}
|
|
103
|
+
interface TaskCancelResult {
|
|
104
|
+
executionId: string;
|
|
105
|
+
cancelled: boolean;
|
|
106
|
+
}
|
|
107
|
+
interface RunningTaskInfo {
|
|
108
|
+
executionId: string;
|
|
109
|
+
taskId: string;
|
|
110
|
+
startedAt: string;
|
|
111
|
+
}
|
|
112
|
+
interface TaskListRunningResult {
|
|
113
|
+
executions: RunningTaskInfo[];
|
|
114
|
+
}
|
|
115
|
+
interface TaskStartedEventParams {
|
|
116
|
+
executionId: string;
|
|
117
|
+
taskId: string;
|
|
118
|
+
startedAt: string;
|
|
31
119
|
}
|
|
32
|
-
interface
|
|
33
|
-
|
|
120
|
+
interface TaskOutputEventParams {
|
|
121
|
+
executionId: string;
|
|
122
|
+
stream: "stdout" | "stderr";
|
|
123
|
+
data: string;
|
|
124
|
+
}
|
|
125
|
+
interface TaskCompletedEventParams {
|
|
126
|
+
executionId: string;
|
|
127
|
+
log: TaskExecutionLog;
|
|
128
|
+
}
|
|
129
|
+
interface TaskFailedEventParams {
|
|
130
|
+
executionId: string;
|
|
131
|
+
status: "failure" | "timeout";
|
|
132
|
+
reason: "error" | "timeout";
|
|
133
|
+
log: TaskExecutionLog;
|
|
134
|
+
}
|
|
135
|
+
interface TaskCancelledEventParams {
|
|
136
|
+
executionId: string;
|
|
137
|
+
log: TaskExecutionLog;
|
|
138
|
+
}
|
|
139
|
+
interface SchedulerStatus {
|
|
34
140
|
running: boolean;
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
interface
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
55
|
-
interface
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
141
|
+
pid: number | null;
|
|
142
|
+
uptimeSeconds: number | null;
|
|
143
|
+
tasksRegistered: number;
|
|
144
|
+
tasksEnabled: number;
|
|
145
|
+
workspacePath: string;
|
|
146
|
+
pidFile: string;
|
|
147
|
+
}
|
|
148
|
+
interface ScheduleCreateResult {
|
|
149
|
+
task: ScheduledTask;
|
|
150
|
+
}
|
|
151
|
+
interface ScheduleListResult {
|
|
152
|
+
tasks: ScheduledTask[];
|
|
153
|
+
total: number;
|
|
154
|
+
}
|
|
155
|
+
interface ScheduleGetResult {
|
|
156
|
+
task: ScheduledTask;
|
|
157
|
+
}
|
|
158
|
+
interface ScheduleEditResult {
|
|
159
|
+
task: ScheduledTask;
|
|
160
|
+
}
|
|
161
|
+
interface ScheduleDeleteResult {
|
|
162
|
+
id: string;
|
|
163
|
+
name: string;
|
|
164
|
+
}
|
|
165
|
+
interface ScheduleToggleResult {
|
|
166
|
+
task: ScheduledTask;
|
|
167
|
+
}
|
|
168
|
+
interface ScheduleTriggerResult {
|
|
169
|
+
log: TaskExecutionLog;
|
|
170
|
+
}
|
|
171
|
+
interface ScheduleLogsResult {
|
|
172
|
+
logs: TaskExecutionLog[];
|
|
173
|
+
total: number;
|
|
174
|
+
}
|
|
175
|
+
interface SchedulerStartResult {
|
|
176
|
+
pid: number;
|
|
177
|
+
status: "started" | "already_running";
|
|
178
|
+
workspacePath: string;
|
|
179
|
+
}
|
|
180
|
+
interface SchedulerStopResult {
|
|
181
|
+
status: "stopped";
|
|
182
|
+
pid: number;
|
|
183
|
+
}
|
|
184
|
+
interface ScheduleCreateDryRunResult {
|
|
185
|
+
action: "create";
|
|
186
|
+
task: Omit<ScheduledTask, "id" | "createdAt" | "updatedAt">;
|
|
187
|
+
conflicts: string[];
|
|
188
|
+
}
|
|
189
|
+
interface ScheduleEditDryRunResult {
|
|
190
|
+
action: "edit";
|
|
191
|
+
before: ScheduledTask;
|
|
192
|
+
after: ScheduledTask;
|
|
193
|
+
diff: string[];
|
|
194
|
+
}
|
|
195
|
+
interface ScheduleDeleteDryRunResult {
|
|
196
|
+
action: "delete";
|
|
197
|
+
task: ScheduledTask;
|
|
198
|
+
}
|
|
199
|
+
declare function isScheduledTaskType(value: unknown): value is ScheduledTaskType;
|
|
200
|
+
declare function isScheduledTask(value: unknown): value is ScheduledTask;
|
|
201
|
+
declare function isTaskExecutionLog(value: unknown): value is TaskExecutionLog;
|
|
202
|
+
declare function isSchedulerStatus(value: unknown): value is SchedulerStatus;
|
|
203
|
+
declare function isTaskExecuteResult(value: unknown): value is TaskExecuteResult;
|
|
204
|
+
declare function isTaskCancelResult(value: unknown): value is TaskCancelResult;
|
|
205
|
+
declare function isTaskListRunningResult(value: unknown): value is TaskListRunningResult;
|
|
206
|
+
declare function isTaskStartedEventParams(value: unknown): value is TaskStartedEventParams;
|
|
207
|
+
declare function isTaskOutputEventParams(value: unknown): value is TaskOutputEventParams;
|
|
208
|
+
declare function isTaskCompletedEventParams(value: unknown): value is TaskCompletedEventParams;
|
|
209
|
+
declare function isTaskFailedEventParams(value: unknown): value is TaskFailedEventParams;
|
|
210
|
+
declare function isTaskCancelledEventParams(value: unknown): value is TaskCancelledEventParams;
|
|
211
|
+
type AgentSessionStatus = "idle" | "running" | "needs-input" | "completed" | "failed" | "aborted";
|
|
65
212
|
declare function isAgentSessionStatus(value: unknown): value is AgentSessionStatus;
|
|
66
|
-
declare function isOpenCodeServerState(value: unknown): value is OpenCodeServerState;
|
|
67
|
-
declare function isOpenCodeSessionStatusEvent(value: unknown): value is OpenCodeSessionStatusEvent;
|
|
68
|
-
declare function isOpenCodeSessionProgressEvent(value: unknown): value is OpenCodeSessionProgressEvent;
|
|
69
|
-
declare function isOpenCodeSessionMessageEvent(value: unknown): value is OpenCodeSessionMessageEvent;
|
|
70
|
-
declare function isOpenCodeSessionErrorEvent(value: unknown): value is OpenCodeSessionErrorEvent;
|
|
71
|
-
declare function isOpenCodeSessionCompletedEvent(value: unknown): value is OpenCodeSessionCompletedEvent;
|
|
72
|
-
declare function isOpenCodeAgentEvent(value: unknown): value is OpenCodeAgentEvent;
|
|
73
213
|
|
|
74
|
-
declare const SERVICEME_PROTOCOL_VERSION:
|
|
214
|
+
declare const SERVICEME_PROTOCOL_VERSION: 2;
|
|
215
|
+
type SupportedBridgeProtocolVersion = 1 | 2;
|
|
75
216
|
interface BridgeCapabilities {
|
|
76
217
|
bridge: true;
|
|
77
|
-
opencode: 1;
|
|
78
218
|
json: 1;
|
|
79
219
|
env: 1;
|
|
220
|
+
tasks?: 1;
|
|
80
221
|
}
|
|
81
222
|
declare function isBridgeCapabilities(value: unknown): value is BridgeCapabilities;
|
|
82
223
|
interface BridgeMethodMap {
|
|
@@ -88,7 +229,7 @@ interface BridgeMethodMap {
|
|
|
88
229
|
};
|
|
89
230
|
result: {
|
|
90
231
|
cliVersion: string;
|
|
91
|
-
protocolVersion:
|
|
232
|
+
protocolVersion: SupportedBridgeProtocolVersion;
|
|
92
233
|
capabilities: BridgeCapabilities;
|
|
93
234
|
pid: number;
|
|
94
235
|
};
|
|
@@ -105,100 +246,51 @@ interface BridgeMethodMap {
|
|
|
105
246
|
shuttingDown: true;
|
|
106
247
|
};
|
|
107
248
|
};
|
|
108
|
-
"
|
|
109
|
-
params:
|
|
110
|
-
result:
|
|
111
|
-
};
|
|
112
|
-
"opencode.server.status": {
|
|
113
|
-
params: OpenCodeRuntimeOptions;
|
|
114
|
-
result: OpenCodeServerState;
|
|
115
|
-
};
|
|
116
|
-
"opencode.session.create": {
|
|
117
|
-
params: {
|
|
118
|
-
chatSessionId: string;
|
|
119
|
-
workspaceRoot?: string;
|
|
120
|
-
runtime?: OpenCodeRuntimeOptions;
|
|
121
|
-
};
|
|
122
|
-
result: {
|
|
123
|
-
sessionId: string;
|
|
124
|
-
title?: string;
|
|
125
|
-
status: AgentSessionStatus;
|
|
126
|
-
};
|
|
127
|
-
};
|
|
128
|
-
"opencode.session.prompt": {
|
|
129
|
-
params: {
|
|
130
|
-
sessionId: string;
|
|
131
|
-
promptId: string;
|
|
132
|
-
prompt: string;
|
|
133
|
-
workspaceRoot?: string;
|
|
134
|
-
runtime?: OpenCodeRuntimeOptions;
|
|
135
|
-
};
|
|
136
|
-
result: {
|
|
137
|
-
accepted: true;
|
|
138
|
-
sessionId: string;
|
|
139
|
-
promptId: string;
|
|
140
|
-
};
|
|
141
|
-
};
|
|
142
|
-
"opencode.session.status": {
|
|
143
|
-
params: {
|
|
144
|
-
sessionId: string;
|
|
145
|
-
workspaceRoot?: string;
|
|
146
|
-
};
|
|
147
|
-
result: {
|
|
148
|
-
sessionId: string;
|
|
149
|
-
status: AgentSessionStatus;
|
|
150
|
-
};
|
|
249
|
+
"task.execute": {
|
|
250
|
+
params: TaskExecutionSnapshot;
|
|
251
|
+
result: TaskExecuteResult;
|
|
151
252
|
};
|
|
152
|
-
"
|
|
253
|
+
"task.cancel": {
|
|
153
254
|
params: {
|
|
154
|
-
|
|
155
|
-
workspaceRoot?: string;
|
|
156
|
-
};
|
|
157
|
-
result: {
|
|
158
|
-
aborted: true;
|
|
159
|
-
sessionId: string;
|
|
255
|
+
executionId: string;
|
|
160
256
|
};
|
|
257
|
+
result: TaskCancelResult;
|
|
161
258
|
};
|
|
162
|
-
"
|
|
163
|
-
params:
|
|
164
|
-
|
|
165
|
-
};
|
|
166
|
-
result: {
|
|
167
|
-
disposed: true;
|
|
168
|
-
sessionId: string;
|
|
169
|
-
};
|
|
259
|
+
"task.list-running": {
|
|
260
|
+
params: Record<string, never>;
|
|
261
|
+
result: TaskListRunningResult;
|
|
170
262
|
};
|
|
171
263
|
}
|
|
172
|
-
declare const BRIDGE_METHODS: readonly ["system.hello", "system.ping", "system.shutdown", "
|
|
264
|
+
declare const BRIDGE_METHODS: readonly ["system.hello", "system.ping", "system.shutdown", "task.execute", "task.cancel", "task.list-running"];
|
|
173
265
|
type BridgeMethod = keyof BridgeMethodMap;
|
|
174
266
|
type BridgeParams<M extends BridgeMethod> = BridgeMethodMap[M]["params"];
|
|
175
267
|
type BridgeResult<M extends BridgeMethod> = BridgeMethodMap[M]["result"];
|
|
176
268
|
interface BridgeEventMap {
|
|
177
|
-
"
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
269
|
+
"task.started": TaskStartedEventParams;
|
|
270
|
+
"task.output": TaskOutputEventParams;
|
|
271
|
+
"task.completed": TaskCompletedEventParams;
|
|
272
|
+
"task.failed": TaskFailedEventParams;
|
|
273
|
+
"task.cancelled": TaskCancelledEventParams;
|
|
182
274
|
}
|
|
183
|
-
declare const BRIDGE_EVENTS: readonly ["
|
|
275
|
+
declare const BRIDGE_EVENTS: readonly ["task.started", "task.output", "task.completed", "task.failed", "task.cancelled"];
|
|
184
276
|
type BridgeEventName = keyof BridgeEventMap;
|
|
185
277
|
type BridgeEventParams<E extends BridgeEventName> = BridgeEventMap[E];
|
|
186
278
|
interface BridgeRequest<M extends BridgeMethod = BridgeMethod> {
|
|
187
|
-
protocolVersion:
|
|
279
|
+
protocolVersion: SupportedBridgeProtocolVersion;
|
|
188
280
|
kind: "request";
|
|
189
281
|
id: string;
|
|
190
282
|
method: M;
|
|
191
283
|
params: BridgeParams<M>;
|
|
192
284
|
}
|
|
193
285
|
interface BridgeSuccessResponse<M extends BridgeMethod = BridgeMethod> {
|
|
194
|
-
protocolVersion:
|
|
286
|
+
protocolVersion: SupportedBridgeProtocolVersion;
|
|
195
287
|
kind: "response";
|
|
196
288
|
id: string;
|
|
197
289
|
ok: true;
|
|
198
290
|
result: BridgeResult<M>;
|
|
199
291
|
}
|
|
200
292
|
interface BridgeErrorResponse {
|
|
201
|
-
protocolVersion:
|
|
293
|
+
protocolVersion: SupportedBridgeProtocolVersion;
|
|
202
294
|
kind: "response";
|
|
203
295
|
id: string;
|
|
204
296
|
ok: false;
|
|
@@ -206,7 +298,7 @@ interface BridgeErrorResponse {
|
|
|
206
298
|
}
|
|
207
299
|
type BridgeResponse<M extends BridgeMethod = BridgeMethod> = BridgeSuccessResponse<M> | BridgeErrorResponse;
|
|
208
300
|
interface BridgeEvent<E extends BridgeEventName = BridgeEventName> {
|
|
209
|
-
protocolVersion:
|
|
301
|
+
protocolVersion: SupportedBridgeProtocolVersion;
|
|
210
302
|
kind: "event";
|
|
211
303
|
event: E;
|
|
212
304
|
params: BridgeEventParams<E>;
|
|
@@ -215,13 +307,7 @@ type BridgeMessage = BridgeRequest | BridgeResponse | BridgeEvent;
|
|
|
215
307
|
declare function isSystemHelloResult(value: unknown): value is BridgeResult<"system.hello">;
|
|
216
308
|
declare function isSystemPingResult(value: unknown): value is BridgeResult<"system.ping">;
|
|
217
309
|
declare function isSystemShutdownResult(value: unknown): value is BridgeResult<"system.shutdown">;
|
|
218
|
-
declare function isOpenCodeSessionCreateResult(value: unknown): value is BridgeResult<"opencode.session.create">;
|
|
219
|
-
declare function isOpenCodeSessionPromptResult(value: unknown): value is BridgeResult<"opencode.session.prompt">;
|
|
220
|
-
declare function isOpenCodeSessionStatusResult(value: unknown): value is BridgeResult<"opencode.session.status">;
|
|
221
|
-
declare function isOpenCodeSessionAbortResult(value: unknown): value is BridgeResult<"opencode.session.abort">;
|
|
222
|
-
declare function isOpenCodeSessionDisposeResult(value: unknown): value is BridgeResult<"opencode.session.dispose">;
|
|
223
310
|
declare function getBridgeResultValidator(method: BridgeMethod): ((value: unknown) => boolean) | undefined;
|
|
224
|
-
declare function isOpenCodeSessionEventParams(value: unknown): value is BridgeEventParams<"opencode.session.event">;
|
|
225
311
|
declare function getBridgeEventParamsValidator(event: BridgeEventName): ((value: unknown) => boolean) | undefined;
|
|
226
312
|
declare function isBridgeMethod(value: unknown): value is BridgeMethod;
|
|
227
313
|
declare function isBridgeEventName(value: unknown): value is BridgeEventName;
|
|
@@ -245,6 +331,31 @@ declare function createCliSuccess<T>(data: T): CliSuccess<T>;
|
|
|
245
331
|
declare function createCliFailure(error: ServicemeErrorDetails): CliFailure;
|
|
246
332
|
declare function isCliEnvelope(value: unknown): value is CliEnvelope<unknown>;
|
|
247
333
|
|
|
334
|
+
interface CopilotDoctorResult {
|
|
335
|
+
installed: boolean;
|
|
336
|
+
version: string | null;
|
|
337
|
+
authenticated: boolean;
|
|
338
|
+
}
|
|
339
|
+
interface CopilotPromptOptions {
|
|
340
|
+
prompt: string;
|
|
341
|
+
workspace?: string;
|
|
342
|
+
allowTools?: string[];
|
|
343
|
+
autopilot?: boolean;
|
|
344
|
+
timeout?: number;
|
|
345
|
+
model?: string;
|
|
346
|
+
agent?: string;
|
|
347
|
+
}
|
|
348
|
+
interface CopilotPromptResult {
|
|
349
|
+
output: string;
|
|
350
|
+
exitCode: number;
|
|
351
|
+
}
|
|
352
|
+
declare const COPILOT_ERROR_CODES: {
|
|
353
|
+
readonly NOT_INSTALLED: "copilot_not_installed";
|
|
354
|
+
readonly AUTH_REQUIRED: "copilot_auth_required";
|
|
355
|
+
readonly EXECUTION_FAILED: "copilot_execution_failed";
|
|
356
|
+
readonly TIMEOUT: "copilot_timeout";
|
|
357
|
+
};
|
|
358
|
+
|
|
248
359
|
declare const KNOWN_ENVIRONMENT_TOOLS: readonly ["git", "node", "npm", "pnpm", "nvm", "nrm", "dotnet", "nuget"];
|
|
249
360
|
type KnownEnvironmentTool = (typeof KNOWN_ENVIRONMENT_TOOLS)[number];
|
|
250
361
|
interface ToolCheckResult {
|
|
@@ -312,10 +423,10 @@ declare function isJsonOutputResult(value: unknown): value is {
|
|
|
312
423
|
};
|
|
313
424
|
|
|
314
425
|
declare const SERVICEME_CLI_NAME = "serviceme";
|
|
315
|
-
declare const SERVICEME_CLI_VERSION = "0.
|
|
426
|
+
declare const SERVICEME_CLI_VERSION = "0.1.2";
|
|
316
427
|
declare const SERVICEME_CLI_CAPABILITIES: {
|
|
317
428
|
readonly bridge: true;
|
|
318
|
-
readonly
|
|
429
|
+
readonly tasks: 1;
|
|
319
430
|
readonly json: 1;
|
|
320
431
|
readonly env: 1;
|
|
321
432
|
readonly image: 1;
|
|
@@ -355,4 +466,4 @@ declare function isServiceMeProjectInstallDepsResult(value: unknown): value is S
|
|
|
355
466
|
declare function isServiceMeProjectExtractTemplateInput(value: unknown): value is ServiceMeProjectExtractTemplateInput;
|
|
356
467
|
declare function isServiceMeProjectExtractTemplateResult(value: unknown): value is ServiceMeProjectExtractTemplateResult;
|
|
357
468
|
|
|
358
|
-
export { type AgentSessionStatus, BRIDGE_EVENTS, BRIDGE_METHODS, type BridgeCapabilities, type BridgeErrorResponse, type BridgeEvent, type BridgeEventMap, type BridgeEventName, type BridgeEventParams, type BridgeMessage, type BridgeMethod, type BridgeMethodMap, type BridgeParams, type BridgeRequest, type BridgeResponse, type BridgeResult, type BridgeSuccessResponse, type CliEnvelope, type CliFailure, type CliSuccess, DEFAULT_JSON_SORT_OPTIONS, type EnvironmentCheckResult, JSON_SORT_ALGORITHMS, JSON_SORT_ORDERS, type JsonSortAlgorithm, type JsonSortOptions, type JsonSortOrder, type JsonValidationResult, KNOWN_ENVIRONMENT_TOOLS, type KnownEnvironmentTool, type
|
|
469
|
+
export { type AgentSessionStatus, BRIDGE_EVENTS, BRIDGE_METHODS, type BridgeCapabilities, type BridgeErrorResponse, type BridgeEvent, type BridgeEventMap, type BridgeEventName, type BridgeEventParams, type BridgeMessage, type BridgeMethod, type BridgeMethodMap, type BridgeParams, type BridgeRequest, type BridgeResponse, type BridgeResult, type BridgeSuccessResponse, COPILOT_ERROR_CODES, type CliEnvelope, type CliFailure, type CliSuccess, type ConcurrencyPolicy, type CopilotDoctorResult, type CopilotPromptOptions, type CopilotPromptResult, DEFAULT_JSON_SORT_OPTIONS, type EnvironmentCheckResult, type GithubCopilotCliPayload, type HttpRequestPayload, JSON_SORT_ALGORITHMS, JSON_SORT_ORDERS, type JsonSortAlgorithm, type JsonSortOptions, type JsonSortOrder, type JsonValidationResult, KNOWN_ENVIRONMENT_TOOLS, type KnownEnvironmentTool, type RunningTaskInfo, SERVICEME_CLI_CAPABILITIES, SERVICEME_CLI_NAME, SERVICEME_CLI_SCHEMA_VERSION, SERVICEME_CLI_VERSION, SERVICEME_ERROR_CODES, SERVICEME_IMAGE_FORMATS, SERVICEME_PROTOCOL_VERSION, type ScheduleCreateDryRunResult, type ScheduleCreateResult, type ScheduleDeleteDryRunResult, type ScheduleDeleteResult, type ScheduleEditDryRunResult, type ScheduleEditResult, type ScheduleGetResult, type ScheduleListResult, type ScheduleLogsResult, type ScheduleToggleResult, type ScheduleTriggerResult, type ScheduledTask, type ScheduledTaskType, type ScheduledTasksConfig, type ScheduledTasksLogFile, type SchedulerStartResult, type SchedulerStatus, type SchedulerStopResult, type ServiceMeImageCompressOptions, type ServiceMeImageCompressResult, type ServiceMeImageFormat, type ServiceMeImageInfo, type ServiceMeImageValidationResult, type ServiceMeProjectExtractTemplateInput, type ServiceMeProjectExtractTemplateResult, type ServiceMeProjectGitInitResult, type ServiceMeProjectInstallDepsResult, type ServiceMeProjectMakeScriptsExecutableResult, type ServiceMeProjectScaffoldPruneResult, type ServicemeErrorCode, type ServicemeErrorDetails, ServicemeProtocolError, type ShellPayload, type SupportedBridgeProtocolVersion, type TaskCancelResult, type TaskCancelledEventParams, type TaskCompletedEventParams, type TaskExecuteResult, type TaskExecutionLog, type TaskExecutionSnapshot, type TaskExecutionStatus, type TaskFailedEventParams, type TaskListRunningResult, type TaskOutputEventParams, type TaskPayload, type TaskStartedEventParams, type TaskTriggerType, type ToolCheckResult, createCliFailure, createCliSuccess, createServicemeError, getBridgeEventParamsValidator, getBridgeResultValidator, isAgentSessionStatus, isBridgeCapabilities, isBridgeEvent, isBridgeEventName, isBridgeMethod, isBridgeRequest, isBridgeResponse, isCliEnvelope, isEnvironmentCheckResult, isJsonOutputResult, isJsonSortAlgorithm, isJsonSortOptions, isJsonSortOrder, isJsonValidationResult, isKnownEnvironmentTool, isRetryableErrorCode, isScheduledTask, isScheduledTaskType, isSchedulerStatus, isServiceMeImageCompressOptions, isServiceMeImageCompressResult, isServiceMeImageFormat, isServiceMeImageInfo, isServiceMeImageValidationResult, isServiceMeProjectExtractTemplateInput, isServiceMeProjectExtractTemplateResult, isServiceMeProjectGitInitResult, isServiceMeProjectInstallDepsResult, isServiceMeProjectMakeScriptsExecutableResult, isServiceMeProjectScaffoldPruneResult, isServicemeErrorCode, isServicemeErrorDetails, isSystemHelloResult, isSystemPingResult, isSystemShutdownResult, isTaskCancelResult, isTaskCancelledEventParams, isTaskCompletedEventParams, isTaskExecuteResult, isTaskExecutionLog, isTaskFailedEventParams, isTaskListRunningResult, isTaskOutputEventParams, isTaskStartedEventParams, isToolCheckResult, normalizeServicemeError };
|