@openagentpack/sdk 0.2.0-beta.0 → 0.3.0-beta-e537ab3-20260722

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.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { R as ResourceAddress, a as ResourceType, C as CloudAgent, b as CloudEnvironment, c as CloudVault, E as EventStreamOptions, P as ProviderSessionEvent, d as EventListOptions, e as ProviderSessionEventList, f as PlannedAction, D as Diagnostic, A as AgentDefinition, g as AgentWithReadiness, h as AgentSyncRun } from './session-event-CObCawiI.js';
2
- export { i as ActionType, j as ActionTypeSchema, k as AgentDefinitionSchema, l as AgentDriftSeverity, m as AgentDriftSeveritySchema, n as AgentModel, o as AgentModelSchema, p as AgentReadiness, q as AgentReadinessSchema, r as AgentReadinessStatus, s as AgentReadinessStatusSchema, t as AgentRecoveryAction, u as AgentRecoveryActionSchema, v as AgentSkillRef, w as AgentSkillRefSchema, x as AgentSyncResult, y as AgentSyncResultSchema, z as AgentSyncRunSchema, B as AgentSyncStatus, F as AgentSyncStatusSchema, G as AgentWithReadinessSchema, H as CloudAgentSchema, I as CloudEnvironmentSchema, J as CloudVaultSchema, K as CreateSessionRequest, L as CreateSessionRequestSchema, M as CreateSessionResponse, N as CreateSessionResponseSchema, O as DiagnosticSchema, Q as DiagnosticSeverity, S as DiagnosticSeveritySchema, T as DriftKind, U as DriftKindSchema, V as GetSessionRequest, W as GetSessionRequestSchema, X as KNOWN_SESSION_EVENT_TYPES, Y as KnownSessionEventType, Z as ListCloudAgentsResponse, _ as ListCloudAgentsResponseSchema, $ as ListCloudEnvironmentsResponse, a0 as ListCloudEnvironmentsResponseSchema, a1 as ListSessionEventsRequest, a2 as ListSessionEventsRequestSchema, a3 as ListSessionEventsResponse, a4 as ListSessionEventsResponseSchema, a5 as ListSessionsRequest, a6 as ListSessionsRequestSchema, a7 as ListSessionsResponse, a8 as ListSessionsResponseSchema, a9 as PlanReadinessImpact, aa as PlanReadinessImpactSchema, ab as PlannedActionSchema, ac as ResourceAddressSchema, ad as ResourceTypeSchema, ae as SendEventRequest, af as SendEventRequestSchema, ag as SendEventResponse, ah as SendEventResponseSchema, ai as Session, aj as SessionAgent, ak as SessionAgentSchema, al as SessionContentBlock, am as SessionContentBlockSchema, an as SessionEvent, ao as SessionEventSchema, ap as SessionEventType, aq as SessionEventTypeName, ar as SessionEventTypeSchema, as as SessionSchema } from './session-event-CObCawiI.js';
1
+ import { R as ResourceAddress, a as ResourceType, C as CloudAgent, b as CloudEnvironment, c as CloudVault, E as EventStreamOptions, P as ProviderSessionEvent, d as EventListOptions, e as ProviderSessionEventList, f as PlannedAction, D as Diagnostic, A as AgentDefinition, g as AgentWithReadiness, h as AgentSyncRun } from './session-event-CxLg_XqS.js';
2
+ export { i as ActionType, j as ActionTypeSchema, k as AgentDefinitionSchema, l as AgentDriftSeverity, m as AgentDriftSeveritySchema, n as AgentModel, o as AgentModelSchema, p as AgentReadiness, q as AgentReadinessSchema, r as AgentReadinessStatus, s as AgentReadinessStatusSchema, t as AgentRecoveryAction, u as AgentRecoveryActionSchema, v as AgentSkillRef, w as AgentSkillRefSchema, x as AgentSyncResult, y as AgentSyncResultSchema, z as AgentSyncRunSchema, B as AgentSyncStatus, F as AgentSyncStatusSchema, G as AgentWithReadinessSchema, H as CloudAgentSchema, I as CloudEnvironmentSchema, J as CloudVaultSchema, K as CreateSessionRequest, L as CreateSessionRequestSchema, M as CreateSessionResponse, N as CreateSessionResponseSchema, O as DiagnosticSchema, Q as DiagnosticSeverity, S as DiagnosticSeveritySchema, T as DriftKind, U as DriftKindSchema, V as GetSessionRequest, W as GetSessionRequestSchema, X as KNOWN_SESSION_EVENT_TYPES, Y as KnownSessionEventType, Z as ListCloudAgentsResponse, _ as ListCloudAgentsResponseSchema, $ as ListCloudEnvironmentsResponse, a0 as ListCloudEnvironmentsResponseSchema, a1 as ListSessionEventsRequest, a2 as ListSessionEventsRequestSchema, a3 as ListSessionEventsResponse, a4 as ListSessionEventsResponseSchema, a5 as ListSessionsRequest, a6 as ListSessionsRequestSchema, a7 as ListSessionsResponse, a8 as ListSessionsResponseSchema, a9 as PlanReadinessImpact, aa as PlanReadinessImpactSchema, ab as PlannedActionSchema, ac as ResourceAddressSchema, ad as ResourceTypeSchema, ae as SendEventRequest, af as SendEventRequestSchema, ag as SendEventResponse, ah as SendEventResponseSchema, ai as Session, aj as SessionAgent, ak as SessionAgentSchema, al as SessionContentBlock, am as SessionContentBlockSchema, an as SessionEvent, ao as SessionEventSchema, ap as SessionEventType, aq as SessionEventTypeName, ar as SessionEventTypeSchema, as as SessionSchema } from './session-event-CxLg_XqS.js';
3
3
  import { P as ProviderFileInfo } from './file-URqwlxLf.js';
4
4
  import 'zod';
5
5
 
@@ -18,17 +18,33 @@ interface ProjectConfig {
18
18
  memory_stores?: Record<string, MemoryStoreDecl>;
19
19
  skills?: Record<string, SkillDecl>;
20
20
  files?: Record<string, FileDecl>;
21
+ identities?: Record<string, IdentityDecl>;
21
22
  agents?: Record<string, AgentDecl>;
23
+ channels?: Record<string, ChannelDecl>;
22
24
  deployments?: Record<string, DeploymentDecl>;
23
25
  }
24
26
  interface DefaultsConfig {
25
27
  provider?: string;
26
- session?: {
27
- qoder?: {
28
- /** Existing Qoder Forward Identity used only as the CLI/session runtime default. */
29
- identity_id?: string;
30
- };
31
- };
28
+ /** Logical name of the default declared Identity used by identity-aware resources and runtimes. */
29
+ identity?: string;
30
+ }
31
+ type IdentityDecl = ManagedIdentityDecl | ExternalIdentityDecl;
32
+ interface ManagedIdentityDecl {
33
+ provider?: ProviderName;
34
+ external_id: string;
35
+ name?: string;
36
+ enabled?: boolean;
37
+ metadata?: Record<string, string>;
38
+ identity_id?: never;
39
+ }
40
+ interface ExternalIdentityDecl {
41
+ provider?: ProviderName;
42
+ /** Pre-existing provider Identity id. External references are never mutated or deleted. */
43
+ identity_id: string;
44
+ external_id?: never;
45
+ name?: never;
46
+ enabled?: never;
47
+ metadata?: never;
32
48
  }
33
49
  interface EnvironmentDecl {
34
50
  name?: string;
@@ -87,6 +103,7 @@ interface CredentialDecl {
87
103
  interface MemoryStoreDecl {
88
104
  description: string;
89
105
  provider?: ProviderName;
106
+ metadata?: Record<string, string>;
90
107
  entries?: MemoryEntryDecl[];
91
108
  }
92
109
  interface MemoryEntryDecl {
@@ -125,6 +142,8 @@ interface AgentDecl {
125
142
  skills?: AgentSkillDecl[];
126
143
  vault?: string;
127
144
  memory_stores?: string[];
145
+ /** Resources mounted into every managed session created for this agent. */
146
+ resources?: SessionResourceDecl[];
128
147
  multiagent?: MultiagentDecl;
129
148
  metadata?: Record<string, string>;
130
149
  /** Provider-specific remote materialization. Omitted means the existing managed Agent resource. */
@@ -133,6 +152,18 @@ interface AgentDecl {
133
152
  interface AgentDeliveryDecl {
134
153
  type: "managed" | "forward";
135
154
  }
155
+ interface ChannelDecl {
156
+ provider?: ProviderName;
157
+ /** Logical Agent name. The provider adapter resolves its materialized remote resource. */
158
+ agent: string;
159
+ /** Logical Identity name. Falls back to defaults.identity. */
160
+ identity?: string;
161
+ type: string;
162
+ name?: string;
163
+ enabled?: boolean;
164
+ credentials?: Record<string, string>;
165
+ options?: Record<string, unknown>;
166
+ }
136
167
  type AgentSkillDecl = string | AgentSkillRefDecl;
137
168
  interface AgentSkillRefDecl {
138
169
  type: "official" | "custom";
@@ -141,6 +172,8 @@ interface AgentSkillRefDecl {
141
172
  }
142
173
  interface AgentToolsDecl {
143
174
  builtin: string[];
175
+ /** Permission inherited by every enabled builtin without an explicit override. */
176
+ default_permission?: "allow" | "ask";
144
177
  mcp?: AgentMcpToolkitDecl[];
145
178
  permissions?: Record<string, "allow" | "ask">;
146
179
  }
@@ -177,8 +210,16 @@ interface DeploymentDecl {
177
210
  description?: string;
178
211
  provider?: ProviderName;
179
212
  metadata?: Record<string, string>;
213
+ /** Qoder-only deployment-level variables copied into each created session. */
214
+ environment_variables?: string;
180
215
  }
181
216
  type DeploymentResourceDecl = DeploymentFileResource | DeploymentMemoryStoreResource | DeploymentGithubRepoResource;
217
+ /** Provider-neutral resources that can be attached directly when a session is created. */
218
+ interface SessionGithubRepoResourceDecl extends Omit<DeploymentGithubRepoResource, "authorization_token"> {
219
+ /** Required for private repositories; interpolate this value from an environment variable. */
220
+ authorization_token: string;
221
+ }
222
+ type SessionResourceDecl = SessionGithubRepoResourceDecl;
182
223
  interface DeploymentFileResource {
183
224
  type: "file";
184
225
  file_id?: string;
@@ -229,13 +270,152 @@ interface ResolvedProjectConfig extends ProjectConfig {
229
270
  _resolved: true;
230
271
  }
231
272
 
273
+ type MemoryMetadata = Record<string, string>;
274
+ interface MemoryStoreInfo {
275
+ id: string;
276
+ type: "memory_store";
277
+ name: string;
278
+ description: string;
279
+ metadata: MemoryMetadata;
280
+ status?: "active" | "archived" | string;
281
+ entry_count?: number;
282
+ total_size?: number;
283
+ session_count?: number;
284
+ created_by?: MemoryActor;
285
+ created_at: string;
286
+ updated_at: string;
287
+ archived_at?: string | null;
288
+ }
289
+ interface MemoryInfo {
290
+ id: string;
291
+ type: "memory";
292
+ memory_store_id: string;
293
+ path: string;
294
+ content?: string | null;
295
+ content_size_bytes: number;
296
+ content_sha256: string;
297
+ version?: number;
298
+ memory_version_id?: string;
299
+ metadata: MemoryMetadata;
300
+ created_by?: MemoryActor;
301
+ created_at: string;
302
+ updated_at: string;
303
+ }
304
+ interface MemoryPrefixInfo {
305
+ type: "memory_prefix";
306
+ path: string;
307
+ }
308
+ type MemoryListItem = MemoryInfo | MemoryPrefixInfo;
309
+ type MemoryVersionOperation = "created" | "updated" | "modified" | "deleted";
310
+ interface MemoryActor {
311
+ type: string;
312
+ api_key_id?: string;
313
+ session_id?: string;
314
+ user_id?: string;
315
+ }
316
+ interface MemoryVersionInfo {
317
+ id: string;
318
+ type: "memory_version";
319
+ memory_store_id: string;
320
+ memory_id: string;
321
+ path?: string | null;
322
+ content?: string | null;
323
+ content_size_bytes?: number | null;
324
+ content_sha256?: string | null;
325
+ operation: MemoryVersionOperation;
326
+ version?: number;
327
+ redacted?: boolean;
328
+ redacted_at?: string | null;
329
+ created_by?: MemoryActor;
330
+ created_at: string;
331
+ }
332
+ interface MemoryPage<T> {
333
+ data: T[];
334
+ has_more: boolean;
335
+ next_cursor?: string;
336
+ }
337
+ interface MemoryProviderCapabilities {
338
+ archive_store: boolean;
339
+ batch_create: boolean;
340
+ versions: boolean;
341
+ optimistic_concurrency: boolean;
342
+ memory_metadata: boolean;
343
+ }
344
+ interface MemoryStoreListOptions {
345
+ limit?: number;
346
+ cursor?: string;
347
+ include_archived?: boolean;
348
+ }
349
+ interface MemoryListOptions {
350
+ limit?: number;
351
+ cursor?: string;
352
+ prefix?: string;
353
+ depth?: number;
354
+ view?: "basic" | "full";
355
+ }
356
+ interface MemoryVersionListOptions {
357
+ limit?: number;
358
+ cursor?: string;
359
+ memory_id?: string;
360
+ view?: "basic" | "full";
361
+ }
362
+ interface CreateMemoryStoreInput {
363
+ name: string;
364
+ description?: string;
365
+ metadata?: MemoryMetadata;
366
+ }
367
+ interface UpdateMemoryStoreInput {
368
+ name?: string;
369
+ description?: string;
370
+ metadata?: MemoryMetadata;
371
+ }
372
+ interface CreateMemoryInput {
373
+ path: string;
374
+ content: string;
375
+ metadata?: MemoryMetadata;
376
+ }
377
+ interface BatchCreateMemoryInput {
378
+ items: CreateMemoryInput[];
379
+ on_conflict?: "overwrite" | "fail";
380
+ }
381
+ interface BatchCreateMemoryResultItem {
382
+ path: string;
383
+ memory?: MemoryInfo;
384
+ error?: {
385
+ type: string;
386
+ message: string;
387
+ };
388
+ }
389
+ interface BatchCreateMemoryResult {
390
+ results: BatchCreateMemoryResultItem[];
391
+ }
392
+ interface UpdateMemoryInput {
393
+ path?: string;
394
+ content?: string;
395
+ metadata?: MemoryMetadata;
396
+ expected_content_sha256?: string;
397
+ }
398
+
232
399
  interface SessionFileResource {
233
400
  file_id: string;
234
401
  mount_path: string;
235
402
  }
403
+ interface SessionGithubRepositoryResource {
404
+ type: "github_repository";
405
+ url: string;
406
+ checkout?: {
407
+ branch?: string;
408
+ commit?: string;
409
+ };
410
+ mount_path?: string;
411
+ authorization_token: string;
412
+ }
413
+ type SessionResource = SessionGithubRepositoryResource;
236
414
  interface CommonSessionBindings {
237
415
  /** Uploaded files to mount in the session sandbox. */
238
416
  files?: SessionFileResource[];
417
+ /** Provider-neutral resources to mount when the session is created. */
418
+ resources?: SessionResource[];
239
419
  title?: string;
240
420
  metadata?: Record<string, string>;
241
421
  }
@@ -385,6 +565,10 @@ interface ResolvedDeploymentRefs {
385
565
  vault_ids: string[];
386
566
  memory_store_ids: Record<string, string>;
387
567
  }
568
+ interface ResolvedChannelRefs {
569
+ identity_id: string;
570
+ agent_id: string;
571
+ }
388
572
  interface DeploymentContext {
389
573
  id: string | null;
390
574
  name: string;
@@ -415,6 +599,20 @@ interface DeploymentInfo$1 {
415
599
  };
416
600
  attributes?: Record<string, unknown>;
417
601
  }
602
+ interface DeploymentListFilter {
603
+ agent_id?: string;
604
+ status?: "active" | "paused";
605
+ include_archived?: boolean;
606
+ limit?: number;
607
+ page?: string;
608
+ created_at_gte?: string;
609
+ created_at_lte?: string;
610
+ }
611
+ interface DeploymentListResult {
612
+ deployments: DeploymentInfo$1[];
613
+ has_more: boolean;
614
+ next_page?: string;
615
+ }
418
616
  interface ProviderAdapter {
419
617
  readonly name: string;
420
618
  /**
@@ -422,6 +620,7 @@ interface ProviderAdapter {
422
620
  * resume after. true → send-then-stream with `afterId`; false → connect-before-send.
423
621
  */
424
622
  readonly eventResume: boolean;
623
+ readonly memoryCapabilities?: MemoryProviderCapabilities;
425
624
  validate(): Promise<void>;
426
625
  /**
427
626
  * Locate a remote resource. When `id` is provided, the resource is verified
@@ -464,13 +663,35 @@ interface ProviderAdapter {
464
663
  updateTemplate?(id: string, name: string, decl: AgentDecl, refs: ResolvedTemplateRefs): Promise<RemoteResource>;
465
664
  /** Remove the template from desired state. Qoder implements this as a soft archive. */
466
665
  archiveTemplate?(id: string): Promise<void>;
666
+ createIdentity?(name: string, decl: IdentityDecl): Promise<RemoteResource>;
667
+ updateIdentity?(id: string, name: string, decl: IdentityDecl): Promise<RemoteResource>;
668
+ deleteIdentity?(id: string): Promise<void>;
669
+ createChannel?(name: string, decl: ChannelDecl, refs: ResolvedChannelRefs): Promise<RemoteResource>;
670
+ updateChannel?(id: string, name: string, decl: ChannelDecl, refs: ResolvedChannelRefs): Promise<RemoteResource>;
671
+ deleteChannel?(id: string): Promise<void>;
467
672
  createMemoryStore?(name: string, decl: MemoryStoreDecl): Promise<RemoteResource>;
468
673
  deleteMemoryStore?(id: string): Promise<void>;
674
+ listMemoryStores?(options?: MemoryStoreListOptions): Promise<MemoryPage<MemoryStoreInfo>>;
675
+ getMemoryStore?(id: string): Promise<MemoryStoreInfo>;
676
+ updateMemoryStore?(id: string, input: UpdateMemoryStoreInput): Promise<MemoryStoreInfo>;
677
+ archiveMemoryStore?(id: string): Promise<MemoryStoreInfo>;
678
+ createMemory?(storeId: string, input: CreateMemoryInput): Promise<MemoryInfo>;
679
+ batchCreateMemories?(storeId: string, input: BatchCreateMemoryInput): Promise<BatchCreateMemoryResult>;
680
+ listMemories?(storeId: string, options?: MemoryListOptions): Promise<MemoryPage<MemoryListItem>>;
681
+ getMemory?(storeId: string, memoryId: string): Promise<MemoryInfo>;
682
+ updateMemory?(storeId: string, memoryId: string, input: UpdateMemoryInput): Promise<MemoryInfo>;
683
+ deleteMemory?(storeId: string, memoryId: string, expectedContentSha256?: string): Promise<void>;
684
+ listMemoryVersions?(storeId: string, options?: MemoryVersionListOptions): Promise<MemoryPage<MemoryVersionInfo>>;
685
+ getMemoryVersion?(storeId: string, versionId: string): Promise<MemoryVersionInfo>;
686
+ redactMemoryVersion?(storeId: string, versionId: string): Promise<MemoryVersionInfo>;
469
687
  createDeployment(name: string, decl: DeploymentDecl, refs: ResolvedDeploymentRefs, basePath: string): Promise<RemoteResource>;
470
688
  updateDeployment(id: string, name: string, decl: DeploymentDecl, refs: ResolvedDeploymentRefs, basePath: string): Promise<RemoteResource>;
471
689
  deleteDeployment(id: string): Promise<void>;
472
690
  runDeployment(ctx: DeploymentContext): Promise<DeploymentRunResult$1>;
473
691
  getDeployment(ctx: DeploymentContext): Promise<DeploymentInfo$1>;
692
+ listDeployments?(filter?: DeploymentListFilter): Promise<DeploymentListResult>;
693
+ pauseDeployment?(ctx: DeploymentContext): Promise<DeploymentInfo$1>;
694
+ unpauseDeployment?(ctx: DeploymentContext): Promise<DeploymentInfo$1>;
474
695
  uploadFile(filePath: string, options?: {
475
696
  name?: string;
476
697
  purpose?: string;
@@ -777,6 +998,9 @@ declare function migrateConfig(opts: MigrateOptions): Promise<MigrateResult>;
777
998
  interface DeploymentRunAdapter {
778
999
  runDeployment(ctx: DeploymentContext): Promise<DeploymentRunResult$1>;
779
1000
  getDeployment(ctx: DeploymentContext): Promise<DeploymentInfo$1>;
1001
+ listDeployments?(filter?: DeploymentListFilter): Promise<DeploymentListResult>;
1002
+ pauseDeployment?(ctx: DeploymentContext): Promise<DeploymentInfo$1>;
1003
+ unpauseDeployment?(ctx: DeploymentContext): Promise<DeploymentInfo$1>;
780
1004
  }
781
1005
 
782
1006
  interface DeploymentSummary {
@@ -827,9 +1051,11 @@ interface DeploymentRun {
827
1051
  provider: string;
828
1052
  result: DeploymentRunResult;
829
1053
  }
1054
+ declare function listRemoteDeploymentsForContext(ctx: ProjectRuntimeContext, provider: string, filter?: DeploymentListFilter): Promise<DeploymentListResult>;
830
1055
  declare function listDeploymentsForContext(ctx: ProjectRuntimeContext, providerFilter?: string): DeploymentSummary[];
831
1056
  declare function getDeploymentDetailsForContext(ctx: ProjectRuntimeContext, name: string, adapter?: Pick<DeploymentRunAdapter, "getDeployment">, resolvedProvider?: string): Promise<DeploymentDetail>;
832
1057
  declare function runDeploymentForContext(ctx: ProjectRuntimeContext, name: string, adapter?: Pick<DeploymentRunAdapter, "runDeployment">, resolvedProvider?: string): Promise<DeploymentRun>;
1058
+ declare function pauseDeploymentForContext(ctx: ProjectRuntimeContext, name: string, paused: boolean, resolvedProvider?: string): Promise<DeploymentInfo$1>;
833
1059
  declare function getDeploymentRuntimeProviderForContext(ctx: ProjectRuntimeContext, name: string, overrideProvider?: string): string;
834
1060
 
835
1061
  type DestroyResourceStatus = "success" | "failed" | "blocked" | "skipped";
@@ -890,6 +1116,23 @@ interface ModelListAdapter {
890
1116
  declare function listProviderModelsForContext(providers: ReadonlyMap<string, ModelListAdapter>, providerFilter?: string): Promise<ProviderModelListing[]>;
891
1117
  declare function listProviderNames(): string[];
892
1118
 
1119
+ declare function listMemoryStores(providers: ReadonlyMap<string, ProviderAdapter>, provider: string, options?: MemoryStoreListOptions): Promise<MemoryPage<MemoryStoreInfo>>;
1120
+ declare function getMemoryProviderCapabilities(providers: ReadonlyMap<string, ProviderAdapter>, provider: string): MemoryProviderCapabilities;
1121
+ declare function createMemoryStore(providers: ReadonlyMap<string, ProviderAdapter>, provider: string, input: CreateMemoryStoreInput): Promise<MemoryStoreInfo>;
1122
+ declare function deleteMemoryStore(providers: ReadonlyMap<string, ProviderAdapter>, provider: string, id: string): Promise<void>;
1123
+ declare function getMemoryStore(providers: ReadonlyMap<string, ProviderAdapter>, provider: string, id: string): Promise<MemoryStoreInfo>;
1124
+ declare function updateMemoryStore(providers: ReadonlyMap<string, ProviderAdapter>, provider: string, id: string, input: UpdateMemoryStoreInput): Promise<MemoryStoreInfo>;
1125
+ declare function archiveMemoryStore(providers: ReadonlyMap<string, ProviderAdapter>, provider: string, id: string): Promise<MemoryStoreInfo>;
1126
+ declare function createMemory(providers: ReadonlyMap<string, ProviderAdapter>, provider: string, storeId: string, input: CreateMemoryInput): Promise<MemoryInfo>;
1127
+ declare function batchCreateMemories(providers: ReadonlyMap<string, ProviderAdapter>, provider: string, storeId: string, input: BatchCreateMemoryInput): Promise<BatchCreateMemoryResult>;
1128
+ declare function listMemories(providers: ReadonlyMap<string, ProviderAdapter>, provider: string, storeId: string, options?: MemoryListOptions): Promise<MemoryPage<MemoryListItem>>;
1129
+ declare function getMemory(providers: ReadonlyMap<string, ProviderAdapter>, provider: string, storeId: string, memoryId: string): Promise<MemoryInfo>;
1130
+ declare function updateMemory(providers: ReadonlyMap<string, ProviderAdapter>, provider: string, storeId: string, memoryId: string, input: UpdateMemoryInput): Promise<MemoryInfo>;
1131
+ declare function deleteMemory(providers: ReadonlyMap<string, ProviderAdapter>, provider: string, storeId: string, memoryId: string, expected?: string): Promise<void>;
1132
+ declare function listMemoryVersions(providers: ReadonlyMap<string, ProviderAdapter>, provider: string, storeId: string, options?: MemoryVersionListOptions): Promise<MemoryPage<MemoryVersionInfo>>;
1133
+ declare function getMemoryVersion(providers: ReadonlyMap<string, ProviderAdapter>, provider: string, storeId: string, versionId: string): Promise<MemoryVersionInfo>;
1134
+ declare function redactMemoryVersion(providers: ReadonlyMap<string, ProviderAdapter>, provider: string, storeId: string, versionId: string): Promise<MemoryVersionInfo>;
1135
+
893
1136
  interface AgentSkillBuildInput {
894
1137
  kind: "official" | "custom";
895
1138
  /** Skill code/id for official skills. */
@@ -1000,7 +1243,7 @@ declare function listAgentsWithReadiness(ctx: ProjectRuntimeContext, options?: {
1000
1243
  declare function syncAgentResourcesWithStateBackend(input: BackendRuntimeInput, agentId: string, options?: AgentResourceSyncOptions): Promise<AgentSyncRun>;
1001
1244
 
1002
1245
  interface SessionCreateOptions {
1003
- /** Explicit Qoder Forward Identity id. Overrides defaults.session.qoder.identity_id. */
1246
+ /** Explicit provider Identity id. Overrides the declared defaults.identity reference. */
1004
1247
  identityId?: string;
1005
1248
  environment?: string;
1006
1249
  /**
@@ -1028,6 +1271,8 @@ interface SessionCreateOptions {
1028
1271
  fileId: string;
1029
1272
  mountPath: string;
1030
1273
  }[];
1274
+ /** Explicit resources override the resources declared on the agent. */
1275
+ resources?: SessionResourceDecl[];
1031
1276
  title?: string;
1032
1277
  provider?: string;
1033
1278
  metadata?: Record<string, string>;
@@ -1139,12 +1384,16 @@ declare function streamSessionEvents(ctx: ProjectRuntimeContext, sessionId: stri
1139
1384
  interface MountedFile {
1140
1385
  mount_path: string;
1141
1386
  }
1387
+ /** Resolve the provider path used for a mounted Git repository. */
1388
+ declare function resolveRepositoryMountPath(provider: string, resource: SessionGithubRepositoryResource): string;
1142
1389
  /** Prepend the file-mount hint to a prompt. Returns the prompt unchanged when there are no files. */
1143
1390
  declare function prependFileHint(prompt: string, files: MountedFile[] | undefined, provider: string): string;
1144
1391
  /** 将 prompt 内 ⟦file:mountPath⟧ 占位符替换为 provider 感知的真实 sandbox 路径 */
1145
1392
  declare function rewriteFileMentions(prompt: string, provider: string): string;
1146
1393
  /** 发送给 provider 前统一处理:先替换 mention 占位符,再 prepend 文件 hint */
1147
1394
  declare function preparePromptForProvider(prompt: string, files: MountedFile[] | undefined, provider: string): string;
1395
+ /** Prepare only the first user message for a newly created Session. */
1396
+ declare function prepareInitialSessionPrompt(prompt: string, bindings: SessionBindings, provider: string): string;
1148
1397
 
1149
1398
  /**
1150
1399
  * Resolve a provider's config block from environment variables (actual values, not
@@ -1212,4 +1461,4 @@ declare class LocalFileStateBackend implements StateBackend {
1212
1461
  /** Normalize a skill zip and extract its entries to SkillFile[]. */
1213
1462
  declare function extractSkillZipFiles(raw: Buffer): Promise<SkillFile[]>;
1214
1463
 
1215
- export { AGENTS_CONFIG_PROVIDERS, AGENTS_PROVIDER_FIELDS, type AgentBuildInput, AgentDefinition, type AgentMcpBuildInput, type AgentSkillBuildInput, AgentSyncRun, AgentWithReadiness, type BackendRuntimeInput, CloudAgent, CloudEnvironment, CloudVault, type CollectedSessionEvents, type DestroyResourceResult, type DestructivePolicy, Diagnostic, type IStateManager, type LoadedProjectConfig, LocalFileStateBackend, type MigrateOptions, type MigrateResult, PlannedAction, type ProjectRuntimeContext, type ProviderConfig, type ProviderConfigProvider, ProviderFileInfo, ProviderSessionEvent, type ProviderSessionInfo, type ProviderSkillInfo, type ResolvedProjectConfig, type ResourceActionResult, ResourceAddress, type ResourceExecutionResult, type ResourcePlanResult, type ResourceRefreshResult, type ResourceRuntimeOptions, type ResourceState, type ResourceSyncRun, ResourceType, type RuntimeFeedbackEvent, type RuntimeFeedbackSink, type SecretPlaceholder, type SkillFile, StateManager, type StateScope, type SyncProjectOptions, type SyncProjectResult, UserError, type ValidateProjectConfigOptions, applyProviderConfigToEnv, archiveCloudAgent, areRuntimeCredentialsReady, bootstrapRuntimeCredentials, bootstrapRuntimeCredentialsSync, buildAgentDecl, collectConfigReferences, createCloudEnvironment, createCloudVault, createProjectRuntime, createSessionForAgent, createSkillFromFileId, decideDestructive, deleteCloudEnvironment, deleteCloudVault, deleteFile, deleteSession, deleteSkill, destroyPlannedProjectResources, executePlannedProject, extractSkillZipFiles, getAgent, getDeploymentDetailsForContext, getDeploymentRuntimeProviderForContext, getFileDownloadUrl, getFileInfo, getSession, getSkillInfo, importResource, isTerminalSessionStatus, listAgentsWithReadiness, listCloudAgents, listCloudEnvironments, listCloudVaults, listDeploymentsForContext, listFiles, listProviderModelsForContext, listProviderNames, listSessionEvents, listSessionSummaries, listSkills, loadDotEnv, loadProviderConfigIntoEnv, loadProviderConfigIntoEnvSync, migrateConfig, parseStateAddress, planDestroyProjectContext, planProjectContext, preparePromptForProvider, prependFileHint, providerConfigPath, readProjectRuntime, resolveActiveProvider, resolveProjectConfig, resolveProjectConfigFromObject, resolveProviderConfigFromEnv, resolveSessionProvider, resolveSyncProvider, rewriteFileMentions, runDeploymentForContext, sendSessionMessagePolling, sendSessionMessageStreaming, startSessionRun, startSessionRunPolling, streamSessionEvents, syncAgentResourcesWithStateBackend, syncProjectResourcesWithStateBackend, syncProviderResourcesFromContext, syncProviderResourcesFromEnv, uploadFile, validateProjectConfig, writeProjectRuntime };
1464
+ export { AGENTS_CONFIG_PROVIDERS, AGENTS_PROVIDER_FIELDS, type AgentBuildInput, AgentDefinition, type AgentMcpBuildInput, type AgentSkillBuildInput, AgentSyncRun, AgentWithReadiness, type BackendRuntimeInput, type BatchCreateMemoryInput, type BatchCreateMemoryResult, CloudAgent, CloudEnvironment, CloudVault, type CollectedSessionEvents, type CreateMemoryInput, type CreateMemoryStoreInput, type DeploymentListFilter, type DeploymentListResult, type DestroyResourceResult, type DestructivePolicy, Diagnostic, type IStateManager, type LoadedProjectConfig, LocalFileStateBackend, type MemoryInfo, type MemoryListItem, type MemoryListOptions, type MemoryPage, type MemoryPrefixInfo, type MemoryProviderCapabilities, type MemoryStoreInfo, type MemoryStoreListOptions, type MemoryVersionInfo, type MemoryVersionListOptions, type MigrateOptions, type MigrateResult, PlannedAction, type ProjectRuntimeContext, type ProviderConfig, type ProviderConfigProvider, ProviderFileInfo, ProviderSessionEvent, type ProviderSessionInfo, type ProviderSkillInfo, type ResolvedProjectConfig, type ResourceActionResult, ResourceAddress, type ResourceExecutionResult, type ResourcePlanResult, type ResourceRefreshResult, type ResourceRuntimeOptions, type ResourceState, type ResourceSyncRun, ResourceType, type RuntimeFeedbackEvent, type RuntimeFeedbackSink, type SecretPlaceholder, type SkillFile, StateManager, type StateScope, type SyncProjectOptions, type SyncProjectResult, type UpdateMemoryInput, type UpdateMemoryStoreInput, UserError, type ValidateProjectConfigOptions, applyProviderConfigToEnv, archiveCloudAgent, archiveMemoryStore, areRuntimeCredentialsReady, batchCreateMemories, bootstrapRuntimeCredentials, bootstrapRuntimeCredentialsSync, buildAgentDecl, collectConfigReferences, createCloudEnvironment, createCloudVault, createMemory, createMemoryStore, createProjectRuntime, createSessionForAgent, createSkillFromFileId, decideDestructive, deleteCloudEnvironment, deleteCloudVault, deleteFile, deleteMemory, deleteMemoryStore, deleteSession, deleteSkill, destroyPlannedProjectResources, executePlannedProject, extractSkillZipFiles, getAgent, getDeploymentDetailsForContext, getDeploymentRuntimeProviderForContext, getFileDownloadUrl, getFileInfo, getMemory, getMemoryProviderCapabilities, getMemoryStore, getMemoryVersion, getSession, getSkillInfo, importResource, isTerminalSessionStatus, listAgentsWithReadiness, listCloudAgents, listCloudEnvironments, listCloudVaults, listDeploymentsForContext, listFiles, listMemories, listMemoryStores, listMemoryVersions, listProviderModelsForContext, listProviderNames, listRemoteDeploymentsForContext, listSessionEvents, listSessionSummaries, listSkills, loadDotEnv, loadProviderConfigIntoEnv, loadProviderConfigIntoEnvSync, migrateConfig, parseStateAddress, pauseDeploymentForContext, planDestroyProjectContext, planProjectContext, prepareInitialSessionPrompt, preparePromptForProvider, prependFileHint, providerConfigPath, readProjectRuntime, redactMemoryVersion, resolveActiveProvider, resolveProjectConfig, resolveProjectConfigFromObject, resolveProviderConfigFromEnv, resolveRepositoryMountPath, resolveSessionProvider, resolveSyncProvider, rewriteFileMentions, runDeploymentForContext, sendSessionMessagePolling, sendSessionMessageStreaming, startSessionRun, startSessionRunPolling, streamSessionEvents, syncAgentResourcesWithStateBackend, syncProjectResourcesWithStateBackend, syncProviderResourcesFromContext, syncProviderResourcesFromEnv, updateMemory, updateMemoryStore, uploadFile, validateProjectConfig, writeProjectRuntime };