qlogicagent 2.3.0 → 2.4.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.
Files changed (65) hide show
  1. package/dist/agent.js +6 -6
  2. package/dist/cli.js +212 -211
  3. package/dist/index.js +211 -210
  4. package/dist/orchestration.js +2 -2
  5. package/dist/protocol.js +1 -0
  6. package/dist/types/agent/tunable-defaults.d.ts +4 -0
  7. package/dist/types/agent/types.d.ts +24 -100
  8. package/dist/types/cli/stdio-server.d.ts +7 -0
  9. package/dist/types/cli/tool-bootstrap.d.ts +6 -0
  10. package/dist/types/contracts/index.d.ts +2 -3
  11. package/dist/types/llm/provider-def.d.ts +3 -0
  12. package/dist/types/llm/transport.d.ts +25 -25
  13. package/dist/types/llm/transports/anthropic-messages.d.ts +2 -2
  14. package/dist/types/llm/transports/gemini-generatecontent.d.ts +2 -2
  15. package/dist/types/llm/transports/openai-chat.d.ts +2 -2
  16. package/dist/types/llm/transports/openai-responses.d.ts +9 -9
  17. package/dist/types/llm/transports/volcengine-responses.d.ts +11 -11
  18. package/dist/types/orchestration/agent-instance.d.ts +15 -0
  19. package/dist/types/orchestration/solo-evaluator.d.ts +7 -0
  20. package/dist/types/orchestration/tool-loop/tool-choice-policy.d.ts +1 -1
  21. package/dist/types/protocol/methods.d.ts +143 -53
  22. package/dist/types/protocol/notifications.d.ts +4 -514
  23. package/dist/types/protocol/wire/acp-protocol.d.ts +411 -0
  24. package/dist/types/protocol/wire/agent-events.d.ts +32 -0
  25. package/dist/types/protocol/wire/agent-methods.d.ts +587 -0
  26. package/dist/types/protocol/wire/agent-rpc.d.ts +97 -0
  27. package/dist/types/protocol/wire/capability-manifest.d.ts +111 -0
  28. package/dist/types/protocol/wire/capability-transport.d.ts +207 -0
  29. package/dist/types/protocol/wire/channel-ingress.d.ts +29 -0
  30. package/dist/types/protocol/wire/channel.d.ts +89 -0
  31. package/dist/types/protocol/wire/chat-types.d.ts +87 -0
  32. package/dist/types/protocol/wire/checkpoint-runtime.d.ts +61 -0
  33. package/dist/types/protocol/wire/checkpoint.d.ts +72 -0
  34. package/dist/types/protocol/wire/execution.d.ts +391 -0
  35. package/dist/types/protocol/wire/gateway-rpc.d.ts +314 -0
  36. package/dist/types/protocol/wire/gateway.d.ts +62 -0
  37. package/dist/types/protocol/wire/hook-protocol.d.ts +37 -0
  38. package/dist/types/protocol/wire/index.d.ts +25 -0
  39. package/dist/types/protocol/wire/memory-provider-lifecycle.d.ts +80 -0
  40. package/dist/types/protocol/wire/notification-payloads.d.ts +581 -0
  41. package/dist/types/protocol/wire/provider-runtime-contract.d.ts +66 -0
  42. package/dist/types/protocol/wire/provider-runtime-core.d.ts +147 -0
  43. package/dist/types/protocol/wire/provider-runtime-io.d.ts +20 -0
  44. package/dist/types/protocol/wire/resource-manifest.d.ts +68 -0
  45. package/dist/types/protocol/wire/session.d.ts +32 -0
  46. package/dist/types/protocol/wire/thread-protocol.d.ts +157 -0
  47. package/dist/types/protocol/wire/transport.d.ts +57 -0
  48. package/dist/types/protocol/wire/turn.d.ts +208 -0
  49. package/dist/types/protocol/wire/web-capability.d.ts +51 -0
  50. package/dist/types/runtime/hooks/memory-hooks.d.ts +2 -2
  51. package/dist/types/runtime/infra/acp-types.d.ts +3 -142
  52. package/dist/types/runtime/infra/token-budget.d.ts +3 -3
  53. package/dist/types/runtime/session/index.d.ts +1 -1
  54. package/dist/types/runtime/session/session-memory.d.ts +46 -0
  55. package/dist/types/runtime/session/session-persistence.d.ts +34 -8
  56. package/dist/types/runtime/session/session-state.d.ts +4 -4
  57. package/dist/types/skills/memory/memory-tool.d.ts +1 -1
  58. package/dist/types/skills/memory/qmemory-adapter.d.ts +1 -1
  59. package/dist/types/skills/permissions/hook-runner.d.ts +4 -4
  60. package/dist/types/skills/permissions/permission-classifier.d.ts +2 -2
  61. package/dist/types/skills/tools/project-switch-tool.d.ts +24 -0
  62. package/dist/types/skills/tools.d.ts +5 -5
  63. package/dist/types/transport/acp-event-emitter.d.ts +1 -1
  64. package/dist/types/transport/acp-server.d.ts +17 -10
  65. package/package.json +14 -3
@@ -0,0 +1,391 @@
1
+ import type { AgentExecutionRefs, AgentExecutionSource, AgentAttemptSource, AgentSidechainType, AgentSidechainRole, AgentSidechainMergePolicy, AgentExecutionSessionStatus, ProxyKeySource, ProxyQuotaSource, TransportResponsePayload, TransportUsageInfo, TransportBillingInfo, ControlApprovalDecision, ControlApprovalSource, ExecutionInterruptReason, ExecutionResumeSource, ExecutionCancelReason } from "./transport.js";
2
+ import type { ModelSelectionReason } from "./session.js";
3
+ import type { TransportCapabilitySummaryContract, TransportApprovalRequiredToolHintEntry, TransportToolEligibilitySummaryEntry, ToolExecutionStepContext } from "./capability-transport.js";
4
+ export interface AgentExecutionRouteInfo {
5
+ requestedModel?: string;
6
+ resolvedModel?: string;
7
+ modelSelectionReason?: ModelSelectionReason;
8
+ aliasId?: string;
9
+ provider?: string;
10
+ model?: string;
11
+ tier?: string;
12
+ keySource?: ProxyKeySource;
13
+ quotaSource?: ProxyQuotaSource;
14
+ }
15
+ export interface AgentExecutionStartedPayload extends AgentExecutionRefs {
16
+ sessionId: string;
17
+ turnId: string;
18
+ executionId: string;
19
+ source: AgentExecutionSource;
20
+ capabilitySnapshotVersion?: string;
21
+ capabilitySummary?: TransportCapabilitySummaryContract;
22
+ approvalRequiredToolHint?: TransportApprovalRequiredToolHintEntry[];
23
+ eligibleToolSummary?: TransportToolEligibilitySummaryEntry[];
24
+ ineligibleToolSummary?: TransportToolEligibilitySummaryEntry[];
25
+ }
26
+ export interface AgentExecutionStartedMsg {
27
+ type: "agent.execution.started";
28
+ id: string;
29
+ payload: AgentExecutionStartedPayload;
30
+ }
31
+ export interface AgentExecutionCompletedPayload extends AgentExecutionRefs {
32
+ sessionId: string;
33
+ turnId: string;
34
+ executionId: string;
35
+ outcomeId: string;
36
+ finalAttemptId?: string;
37
+ resolvedModel?: string;
38
+ modelSelectionReason?: ModelSelectionReason;
39
+ routeExplainSummary?: string;
40
+ response?: TransportResponsePayload;
41
+ usage?: TransportUsageInfo;
42
+ billed?: TransportBillingInfo | null;
43
+ }
44
+ export interface AgentExecutionCompletedMsg {
45
+ type: "agent.execution.completed";
46
+ id: string;
47
+ payload: AgentExecutionCompletedPayload;
48
+ }
49
+ export interface AgentExecutionFailedPayload extends AgentExecutionRefs {
50
+ sessionId: string;
51
+ turnId: string;
52
+ executionId: string;
53
+ outcomeId: string;
54
+ failedAttemptId?: string;
55
+ code: string;
56
+ error: string;
57
+ retryable: boolean;
58
+ terminal?: boolean;
59
+ }
60
+ export interface AgentExecutionFailedMsg {
61
+ type: "agent.execution.failed";
62
+ id: string;
63
+ payload: AgentExecutionFailedPayload;
64
+ }
65
+ export interface AgentAttemptStartedPayload extends AgentExecutionRefs {
66
+ sessionId: string;
67
+ turnId: string;
68
+ executionId: string;
69
+ attemptId: string;
70
+ attemptIndex: number;
71
+ source: AgentAttemptSource;
72
+ route?: AgentExecutionRouteInfo;
73
+ }
74
+ export interface AgentAttemptStartedMsg {
75
+ type: "agent.attempt.started";
76
+ id: string;
77
+ payload: AgentAttemptStartedPayload;
78
+ }
79
+ export interface AgentAttemptCompletedPayload extends AgentExecutionRefs {
80
+ sessionId: string;
81
+ turnId: string;
82
+ executionId: string;
83
+ attemptId: string;
84
+ outcomeId: string;
85
+ response?: TransportResponsePayload;
86
+ usage?: TransportUsageInfo;
87
+ route?: AgentExecutionRouteInfo;
88
+ }
89
+ export interface AgentAttemptCompletedMsg {
90
+ type: "agent.attempt.completed";
91
+ id: string;
92
+ payload: AgentAttemptCompletedPayload;
93
+ }
94
+ export interface AgentAttemptFailedPayload extends AgentExecutionRefs {
95
+ sessionId: string;
96
+ turnId: string;
97
+ executionId: string;
98
+ attemptId: string;
99
+ outcomeId: string;
100
+ route?: AgentExecutionRouteInfo;
101
+ code: string;
102
+ error: string;
103
+ retryable: boolean;
104
+ }
105
+ export interface AgentAttemptFailedMsg {
106
+ type: "agent.attempt.failed";
107
+ id: string;
108
+ payload: AgentAttemptFailedPayload;
109
+ }
110
+ export type AgentSidechainToolAccessDecision = "allowed" | "denied";
111
+ export type AgentSidechainToolAccessInheritance = "inherit" | "shrink";
112
+ export type AgentSidechainToolAccessReason = "default-allow" | "always-deny" | "leaf-deny";
113
+ export interface AgentSidechainToolAccessRule {
114
+ toolName: string;
115
+ decision: AgentSidechainToolAccessDecision;
116
+ inheritance: AgentSidechainToolAccessInheritance;
117
+ reason: AgentSidechainToolAccessReason;
118
+ }
119
+ export interface AgentSidechainToolAccess {
120
+ deniedTools: string[];
121
+ canSpawnChildren: boolean;
122
+ defaultDecision: "allowed";
123
+ defaultInheritance: "inherit";
124
+ tools: AgentSidechainToolAccessRule[];
125
+ }
126
+ export interface AgentSidechainStartedPayload extends AgentExecutionRefs {
127
+ sessionId: string;
128
+ turnId: string;
129
+ executionId: string;
130
+ parentExecutionId: string;
131
+ sidechainId: string;
132
+ sidechainType: AgentSidechainType;
133
+ role: AgentSidechainRole;
134
+ toolAccess?: AgentSidechainToolAccess;
135
+ mergePolicy?: AgentSidechainMergePolicy;
136
+ trigger?: "planner" | "tool-result" | "repair-policy" | "user-followup";
137
+ }
138
+ export interface AgentSidechainStartedMsg {
139
+ type: "agent.sidechain.started";
140
+ id: string;
141
+ payload: AgentSidechainStartedPayload;
142
+ }
143
+ export interface AgentSidechainCompletedPayload extends AgentExecutionRefs {
144
+ sessionId: string;
145
+ turnId: string;
146
+ executionId: string;
147
+ parentExecutionId: string;
148
+ sidechainId: string;
149
+ outcomeId: string;
150
+ summary?: string;
151
+ usage?: TransportUsageInfo;
152
+ }
153
+ export interface AgentSidechainCompletedMsg {
154
+ type: "agent.sidechain.completed";
155
+ id: string;
156
+ payload: AgentSidechainCompletedPayload;
157
+ }
158
+ export interface AgentSidechainFailedPayload extends AgentExecutionRefs {
159
+ sessionId: string;
160
+ turnId: string;
161
+ executionId: string;
162
+ parentExecutionId: string;
163
+ sidechainId: string;
164
+ outcomeId: string;
165
+ code: string;
166
+ error: string;
167
+ retryable: boolean;
168
+ }
169
+ export interface AgentSidechainFailedMsg {
170
+ type: "agent.sidechain.failed";
171
+ id: string;
172
+ payload: AgentSidechainFailedPayload;
173
+ }
174
+ export interface AgentSidechainCancelRequestPayload extends AgentExecutionRefs {
175
+ sessionId: string;
176
+ turnId: string;
177
+ executionId: string;
178
+ sidechainId: string;
179
+ requestedAtMs: number;
180
+ reason?: string;
181
+ }
182
+ export interface AgentSidechainCancelRequestMsg {
183
+ type: "agent.sidechain.cancel.request";
184
+ id: string;
185
+ payload: AgentSidechainCancelRequestPayload;
186
+ }
187
+ export interface AgentSidechainCancelAckPayload extends AgentExecutionRefs {
188
+ sessionId: string;
189
+ turnId: string;
190
+ executionId: string;
191
+ sidechainId: string;
192
+ accepted: boolean;
193
+ cancelledAtMs: number;
194
+ reason?: string;
195
+ }
196
+ export interface AgentSidechainCancelAckMsg {
197
+ type: "agent.sidechain.cancel.ack";
198
+ id: string;
199
+ payload: AgentSidechainCancelAckPayload;
200
+ }
201
+ export interface ControlApprovalRequestedPayload extends AgentExecutionRefs, ToolExecutionStepContext {
202
+ sessionId: string;
203
+ turnId: string;
204
+ executionId: string;
205
+ approvalId: string;
206
+ callId?: string;
207
+ toolName?: string;
208
+ reason?: string;
209
+ createdAtMs: number;
210
+ expiresAtMs: number;
211
+ policyScope?: "tool" | "workspace" | "session";
212
+ }
213
+ export interface ControlApprovalRequestedMsg {
214
+ type: "control.approval.requested";
215
+ id: string;
216
+ payload: ControlApprovalRequestedPayload;
217
+ }
218
+ export interface ControlApprovalRespondedPayload extends AgentExecutionRefs {
219
+ sessionId: string;
220
+ turnId: string;
221
+ executionId: string;
222
+ approvalId: string;
223
+ callId?: string;
224
+ decision: ControlApprovalDecision;
225
+ source: ControlApprovalSource;
226
+ respondedAtMs: number;
227
+ note?: string;
228
+ }
229
+ export interface ControlApprovalRespondedMsg {
230
+ type: "control.approval.responded";
231
+ id: string;
232
+ payload: ControlApprovalRespondedPayload;
233
+ }
234
+ export interface ExecutionInterruptedPayload extends AgentExecutionRefs {
235
+ sessionId: string;
236
+ turnId: string;
237
+ executionId: string;
238
+ reason: ExecutionInterruptReason;
239
+ interruptedAtMs: number;
240
+ resumable: boolean;
241
+ callId?: string;
242
+ approvalId?: string;
243
+ }
244
+ export interface ExecutionInterruptedMsg {
245
+ type: "execution.interrupted";
246
+ id: string;
247
+ payload: ExecutionInterruptedPayload;
248
+ }
249
+ export interface ExecutionResumedPayload extends AgentExecutionRefs {
250
+ sessionId: string;
251
+ turnId: string;
252
+ executionId: string;
253
+ source: ExecutionResumeSource;
254
+ resumedAtMs: number;
255
+ fromEventId?: string;
256
+ }
257
+ export interface ExecutionResumedMsg {
258
+ type: "execution.resumed";
259
+ id: string;
260
+ payload: ExecutionResumedPayload;
261
+ }
262
+ export interface ExecutionCancelledPayload extends AgentExecutionRefs {
263
+ sessionId: string;
264
+ turnId: string;
265
+ executionId: string;
266
+ reason: ExecutionCancelReason;
267
+ cancelledAtMs: number;
268
+ callId?: string;
269
+ approvalId?: string;
270
+ }
271
+ export interface ExecutionCancelledMsg {
272
+ type: "execution.cancelled";
273
+ id: string;
274
+ payload: ExecutionCancelledPayload;
275
+ }
276
+ export interface AgentExecutionSessionSnapshot {
277
+ requestId: string;
278
+ resumeToken: string;
279
+ createdAt: string;
280
+ leaseExpiresAt: string;
281
+ executionId: string | null;
282
+ rootExecutionId: string | null;
283
+ parentExecutionId?: string | null;
284
+ sidechainId?: string | null;
285
+ attemptId?: string | null;
286
+ sessionId: string | null;
287
+ turnId: string | null;
288
+ status: AgentExecutionSessionStatus;
289
+ lastEventAt: string | null;
290
+ lastEventName: string | null;
291
+ replayCursor: number;
292
+ replayStartCursor: number;
293
+ replayEventCount: number;
294
+ ackCursor: number;
295
+ activeStream: boolean;
296
+ }
297
+ export interface AgentRuntimeExecutionSessionListQuery {
298
+ executionId?: string;
299
+ rootExecutionId?: string;
300
+ sessionId?: string;
301
+ turnId?: string;
302
+ resumeToken?: string;
303
+ status?: AgentExecutionSessionStatus;
304
+ activeStream?: boolean;
305
+ limit?: number;
306
+ }
307
+ export interface AgentRuntimeExecutionSessionListPayload {
308
+ items: AgentExecutionSessionSnapshot[];
309
+ }
310
+ export interface AgentExecutionSessionResumeParams {
311
+ ackCursor?: number;
312
+ timeoutMs?: number;
313
+ }
314
+ export interface AgentExecutionSessionResumeState {
315
+ requestId: string;
316
+ resumeToken: string;
317
+ replayCursor: number;
318
+ ackCursor: number;
319
+ }
320
+ export interface AgentSessionEndedPayload {
321
+ sessionId: string;
322
+ sessionKey?: string;
323
+ messageCount: number;
324
+ endedAtMs: number;
325
+ }
326
+ export interface AgentSessionEndedMsg {
327
+ type: "agent.session.ended";
328
+ id: string;
329
+ payload: AgentSessionEndedPayload;
330
+ }
331
+ export interface CheckpointRestoreAckPayload {
332
+ executionId: string;
333
+ rootExecutionId?: string;
334
+ parentExecutionId?: string;
335
+ sidechainId?: string;
336
+ attemptId?: string;
337
+ runId: string;
338
+ sessionId?: string;
339
+ checkpointId: string;
340
+ restoreId: string;
341
+ requestedAtMs: number;
342
+ ackedAtMs: number;
343
+ accepted: boolean;
344
+ reason?: string;
345
+ workingDirectory?: string;
346
+ pathHints?: string[];
347
+ }
348
+ export interface CheckpointRestoreAckMsg {
349
+ type: "checkpoint.restore.ack";
350
+ id: string;
351
+ payload: CheckpointRestoreAckPayload;
352
+ }
353
+ export interface CheckpointRestoredPayload {
354
+ executionId: string;
355
+ rootExecutionId?: string;
356
+ parentExecutionId?: string;
357
+ sidechainId?: string;
358
+ attemptId?: string;
359
+ runId: string;
360
+ sessionId?: string;
361
+ checkpointId: string;
362
+ restoreId: string;
363
+ restoredAtMs: number;
364
+ reason?: string;
365
+ workingDirectory?: string;
366
+ pathHints?: string[];
367
+ }
368
+ export interface CheckpointRestoredMsg {
369
+ type: "checkpoint.restored";
370
+ id: string;
371
+ payload: CheckpointRestoredPayload;
372
+ }
373
+ export interface CheckpointRollbackResultPayload {
374
+ executionId: string;
375
+ rootExecutionId?: string;
376
+ parentExecutionId?: string;
377
+ sidechainId?: string;
378
+ attemptId?: string;
379
+ runId: string;
380
+ sessionId?: string;
381
+ checkpointId: string;
382
+ restoreId: string;
383
+ rollbackCheckpointId: string;
384
+ completedAtMs: number;
385
+ reason?: string;
386
+ }
387
+ export interface CheckpointRollbackResultMsg {
388
+ type: "checkpoint.rollback.result";
389
+ id: string;
390
+ payload: CheckpointRollbackResultPayload;
391
+ }
@@ -0,0 +1,314 @@
1
+ /**
2
+ * Gateway-facing Agent RPC type contract.
3
+ *
4
+ * This file defines the typed `AgentCall` signature that Gateway consumers use
5
+ * to invoke Agent RPC methods with full compile-time safety.
6
+ *
7
+ * Design: Gateway only needs the "shape" of params/result for the methods it
8
+ * actually calls. Internal-only methods (agent internals) are not exposed here.
9
+ *
10
+ * Reference: CC uses Zod union in a single package; we use TypeScript interface map
11
+ * in a shared package (same effect — single source, compile-time checked).
12
+ */
13
+ export type ProjectType = "default" | "personal" | "group";
14
+ export type ProjectStatus = "active" | "archived";
15
+ export interface ProjectInfo {
16
+ id: string;
17
+ name: string;
18
+ workspaceDir: string;
19
+ type: ProjectType;
20
+ status: ProjectStatus;
21
+ groupId?: string;
22
+ createdAt: string;
23
+ updatedAt: string;
24
+ }
25
+ export interface GatewayRpcMethodMap {
26
+ "session.list": {
27
+ params: {
28
+ limit?: number;
29
+ };
30
+ result: {
31
+ sessions: Array<{
32
+ sessionId: string;
33
+ title?: string;
34
+ type?: string;
35
+ groupKey?: string;
36
+ groupPlatform?: string;
37
+ lastActiveAt?: number;
38
+ pinnedAt?: string | null;
39
+ archivedAt?: string | null;
40
+ }>;
41
+ };
42
+ };
43
+ "session.get": {
44
+ params: {
45
+ sessionId: string;
46
+ };
47
+ result: {
48
+ session: {
49
+ sessionId: string;
50
+ title?: string;
51
+ type?: string;
52
+ groupKey?: string;
53
+ groupPlatform?: string;
54
+ lastActiveAt?: number;
55
+ pinnedAt?: string | null;
56
+ archivedAt?: string | null;
57
+ } | null;
58
+ };
59
+ };
60
+ "session.create": {
61
+ params: {
62
+ sessionId: string;
63
+ title?: string;
64
+ type?: string;
65
+ ownerId?: string;
66
+ groupKey?: string;
67
+ groupName?: string;
68
+ groupPlatform?: string;
69
+ projectId?: string;
70
+ projectName?: string;
71
+ };
72
+ result: {
73
+ ok: boolean;
74
+ };
75
+ };
76
+ "session.update": {
77
+ params: {
78
+ sessionId: string;
79
+ title?: string;
80
+ pinnedAt?: string | null;
81
+ archivedAt?: string | null;
82
+ };
83
+ result: {
84
+ ok: boolean;
85
+ };
86
+ };
87
+ "session.delete": {
88
+ params: {
89
+ sessionId: string;
90
+ };
91
+ result: {
92
+ ok: boolean;
93
+ };
94
+ };
95
+ "session.archive": {
96
+ params: {
97
+ sessionId: string;
98
+ };
99
+ result: {
100
+ ok: boolean;
101
+ };
102
+ };
103
+ "session.getState": {
104
+ params: Record<string, never>;
105
+ result: {
106
+ sessionId: string;
107
+ activeProject: ProjectInfo | null;
108
+ projects: ProjectInfo[];
109
+ };
110
+ };
111
+ "session.switchProject": {
112
+ params: {
113
+ projectId?: string;
114
+ projectName?: string;
115
+ workspaceDir?: string;
116
+ };
117
+ result: {
118
+ ok: boolean;
119
+ project: ProjectInfo;
120
+ };
121
+ };
122
+ "session.getMessages": {
123
+ params: {
124
+ sessionId?: string;
125
+ limit?: number;
126
+ };
127
+ result: {
128
+ messages: unknown[];
129
+ total: number;
130
+ };
131
+ };
132
+ "project.list": {
133
+ params: Record<string, never>;
134
+ result: {
135
+ projects: ProjectInfo[];
136
+ };
137
+ };
138
+ "project.create": {
139
+ params: {
140
+ name: string;
141
+ workspaceDir?: string;
142
+ type?: ProjectType;
143
+ groupId?: string;
144
+ };
145
+ result: {
146
+ ok: boolean;
147
+ project?: ProjectInfo;
148
+ error?: string;
149
+ deduplicated?: boolean;
150
+ };
151
+ };
152
+ "project.delete": {
153
+ params: {
154
+ projectId: string;
155
+ };
156
+ result: {
157
+ ok: boolean;
158
+ switchedTo?: ProjectInfo;
159
+ };
160
+ };
161
+ "project.rename": {
162
+ params: {
163
+ projectId: string;
164
+ newName: string;
165
+ };
166
+ result: {
167
+ ok: boolean;
168
+ project?: ProjectInfo;
169
+ };
170
+ };
171
+ "project.archive": {
172
+ params: {
173
+ projectId: string;
174
+ };
175
+ result: {
176
+ ok: boolean;
177
+ };
178
+ };
179
+ "project.unarchive": {
180
+ params: {
181
+ projectId: string;
182
+ };
183
+ result: {
184
+ ok: boolean;
185
+ };
186
+ };
187
+ "project.archiveByGroup": {
188
+ params: {
189
+ platform: string;
190
+ chatId: string;
191
+ };
192
+ result: {
193
+ ok: boolean;
194
+ projectId?: string;
195
+ };
196
+ };
197
+ "instructions.list": {
198
+ params: {
199
+ projectId?: string;
200
+ };
201
+ result: {
202
+ instructions: Array<{
203
+ path: string;
204
+ name: string;
205
+ size: number;
206
+ }>;
207
+ };
208
+ };
209
+ "instructions.read": {
210
+ params: {
211
+ projectId?: string;
212
+ path: string;
213
+ };
214
+ result: {
215
+ content: string;
216
+ path: string;
217
+ };
218
+ };
219
+ "instructions.write": {
220
+ params: {
221
+ projectId?: string;
222
+ path: string;
223
+ content: string;
224
+ };
225
+ result: {
226
+ ok: boolean;
227
+ };
228
+ };
229
+ "instructions.delete": {
230
+ params: {
231
+ projectId?: string;
232
+ path: string;
233
+ };
234
+ result: {
235
+ ok: boolean;
236
+ };
237
+ };
238
+ "files.list": {
239
+ params: {
240
+ projectId: string;
241
+ path?: string;
242
+ };
243
+ result: {
244
+ entries: Array<{
245
+ name: string;
246
+ path: string;
247
+ type: "file" | "directory";
248
+ size?: number;
249
+ modifiedAt?: string;
250
+ }>;
251
+ };
252
+ };
253
+ "files.read": {
254
+ params: {
255
+ projectId: string;
256
+ path: string;
257
+ };
258
+ result: {
259
+ path: string;
260
+ content: string;
261
+ encoding?: string;
262
+ };
263
+ };
264
+ "files.create": {
265
+ params: {
266
+ projectId: string;
267
+ path: string;
268
+ type?: "file" | "directory";
269
+ content?: string;
270
+ };
271
+ result: {
272
+ ok: boolean;
273
+ path: string;
274
+ };
275
+ };
276
+ "files.rename": {
277
+ params: {
278
+ projectId: string;
279
+ oldPath: string;
280
+ newName: string;
281
+ };
282
+ result: {
283
+ ok: boolean;
284
+ newPath?: string;
285
+ };
286
+ };
287
+ "files.delete": {
288
+ params: {
289
+ projectId: string;
290
+ path: string;
291
+ };
292
+ result: {
293
+ ok: boolean;
294
+ };
295
+ };
296
+ "files.gitStatus": {
297
+ params: {
298
+ projectId: string;
299
+ };
300
+ result: {
301
+ files: Array<{
302
+ path: string;
303
+ status: string;
304
+ }>;
305
+ };
306
+ };
307
+ }
308
+ /**
309
+ * Type-safe Agent RPC caller.
310
+ * Gateway passes this around instead of `(string, Record<string, unknown>) => Promise<unknown>`.
311
+ */
312
+ export type AgentCall = <M extends keyof GatewayRpcMethodMap>(method: M, params: GatewayRpcMethodMap[M]["params"]) => Promise<GatewayRpcMethodMap[M]["result"]>;
313
+ /** All gateway-facing RPC method names (runtime array). */
314
+ export declare const GATEWAY_RPC_METHODS: (keyof GatewayRpcMethodMap)[];