@openagentpack/sdk 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-GAAU67HX.js → chunk-6PDVAFLK.js} +13 -0
- package/dist/{file-URqwlxLf.d.ts → file-Cj5-Vx27.d.ts} +5 -0
- package/dist/file-lifecycle.d.ts +1 -1
- package/dist/index.d.ts +278 -24
- package/dist/index.js +1385 -503
- package/dist/{session-event--Mxe1bnT.d.ts → session-event-5kLRNMHC.d.ts} +50 -38
- package/dist/session-events.d.ts +1 -1
- package/dist/session-events.js +2 -1
- package/package.json +1 -1
|
@@ -19,6 +19,8 @@ function toSessionEvent(raw) {
|
|
|
19
19
|
const event = { type, raw_type: rawType, raw };
|
|
20
20
|
if (typeof raw.id === "string") event.id = raw.id;
|
|
21
21
|
if (typeof raw.role === "string") event.role = raw.role;
|
|
22
|
+
const threadId = extractSessionThreadId(raw);
|
|
23
|
+
if (threadId) event.session_thread_id = threadId;
|
|
22
24
|
if (type === "message") {
|
|
23
25
|
if (event.role === void 0) {
|
|
24
26
|
if (rawType === "thread_message_sent") event.role = "user";
|
|
@@ -46,6 +48,17 @@ function toSessionEvent(raw) {
|
|
|
46
48
|
}
|
|
47
49
|
return event;
|
|
48
50
|
}
|
|
51
|
+
function extractSessionThreadId(raw) {
|
|
52
|
+
if (typeof raw.session_thread_id === "string") return raw.session_thread_id;
|
|
53
|
+
const metadata = raw.metadata;
|
|
54
|
+
if (metadata && typeof metadata === "object" && !Array.isArray(metadata)) {
|
|
55
|
+
const value = metadata.session_thread_id;
|
|
56
|
+
if (typeof value === "string") return value;
|
|
57
|
+
}
|
|
58
|
+
const data = firstContentData(raw);
|
|
59
|
+
if (typeof data?.session_thread_id === "string") return data.session_thread_id;
|
|
60
|
+
return void 0;
|
|
61
|
+
}
|
|
49
62
|
function extractContentText(raw) {
|
|
50
63
|
const content = raw.content;
|
|
51
64
|
if (typeof content === "string") return content;
|
package/dist/file-lifecycle.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as ProviderFileInfo } from './file-
|
|
1
|
+
import { P as ProviderFileInfo } from './file-Cj5-Vx27.js';
|
|
2
2
|
|
|
3
3
|
/** Neutral file scan status after provider wire normalization. */
|
|
4
4
|
type NeutralFileStatus = "available" | "checking" | "rejected" | "type_rejected";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
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
|
|
3
|
-
import { P as ProviderFileInfo } from './file-
|
|
1
|
+
import { C as CloudAgent, a as CloudEnvironment, b as CloudVault, R as ResourceAddress, c as ResourceType, 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-5kLRNMHC.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-5kLRNMHC.js';
|
|
3
|
+
import { P as ProviderFileInfo } from './file-Cj5-Vx27.js';
|
|
4
4
|
import 'zod';
|
|
5
5
|
|
|
6
6
|
declare class UserError extends Error {
|
|
@@ -93,6 +93,7 @@ type CredentialType = "static_bearer" | "environment_variable";
|
|
|
93
93
|
interface CredentialDecl {
|
|
94
94
|
name: string;
|
|
95
95
|
type: CredentialType;
|
|
96
|
+
metadata?: Record<string, string>;
|
|
96
97
|
mcp_server_url?: string;
|
|
97
98
|
access_token?: string;
|
|
98
99
|
protocol?: "sse" | "streamable_http";
|
|
@@ -220,6 +221,7 @@ interface MultiagentDecl {
|
|
|
220
221
|
agents: string[];
|
|
221
222
|
}
|
|
222
223
|
interface DeploymentDecl {
|
|
224
|
+
name?: string;
|
|
223
225
|
agent: string;
|
|
224
226
|
agent_version?: number;
|
|
225
227
|
environment?: string;
|
|
@@ -292,6 +294,112 @@ interface ResolvedProjectConfig extends ProjectConfig {
|
|
|
292
294
|
_resolved: true;
|
|
293
295
|
}
|
|
294
296
|
|
|
297
|
+
interface ProviderSkillInfo {
|
|
298
|
+
id: string;
|
|
299
|
+
name: string;
|
|
300
|
+
description?: string;
|
|
301
|
+
source: "custom" | "official";
|
|
302
|
+
status: "checking" | "active" | "rejected" | "deleted";
|
|
303
|
+
latest_version?: string;
|
|
304
|
+
created_at?: string;
|
|
305
|
+
updated_at?: string;
|
|
306
|
+
attributes?: Record<string, unknown>;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
interface CursorPage<T> {
|
|
310
|
+
data: T[];
|
|
311
|
+
has_more: boolean;
|
|
312
|
+
next_page?: string;
|
|
313
|
+
}
|
|
314
|
+
interface CursorListOptions {
|
|
315
|
+
limit?: number;
|
|
316
|
+
page?: string;
|
|
317
|
+
}
|
|
318
|
+
interface AgentListOptions extends CursorListOptions {
|
|
319
|
+
include_archived?: boolean;
|
|
320
|
+
}
|
|
321
|
+
type AgentVersionListOptions = CursorListOptions;
|
|
322
|
+
type AgentPage = CursorPage<CloudAgent>;
|
|
323
|
+
interface EnvironmentListOptions extends CursorListOptions {
|
|
324
|
+
include_archived?: boolean;
|
|
325
|
+
}
|
|
326
|
+
type EnvironmentPage = CursorPage<CloudEnvironment>;
|
|
327
|
+
interface VaultListOptions extends CursorListOptions {
|
|
328
|
+
include_archived?: boolean;
|
|
329
|
+
}
|
|
330
|
+
type VaultPage = CursorPage<CloudVault>;
|
|
331
|
+
interface VaultCredentialInfo {
|
|
332
|
+
id: string;
|
|
333
|
+
display_name: string;
|
|
334
|
+
auth_type: string;
|
|
335
|
+
secret_name?: string;
|
|
336
|
+
mcp_server_url?: string;
|
|
337
|
+
networking_type?: string;
|
|
338
|
+
metadata?: Record<string, string>;
|
|
339
|
+
}
|
|
340
|
+
interface SkillListOptions extends CursorListOptions {
|
|
341
|
+
source?: "custom" | "official";
|
|
342
|
+
}
|
|
343
|
+
interface SkillVersionInfo {
|
|
344
|
+
id?: string;
|
|
345
|
+
skill_id: string;
|
|
346
|
+
type: string;
|
|
347
|
+
name?: string;
|
|
348
|
+
description?: string;
|
|
349
|
+
version: string;
|
|
350
|
+
status?: string;
|
|
351
|
+
created_at?: string;
|
|
352
|
+
updated_at?: string;
|
|
353
|
+
additional_properties?: Record<string, unknown>;
|
|
354
|
+
attributes: Record<string, unknown>;
|
|
355
|
+
}
|
|
356
|
+
type SkillVersionListOptions = CursorListOptions;
|
|
357
|
+
type SkillVersionPage = CursorPage<SkillVersionInfo>;
|
|
358
|
+
interface SkillDownloadInfo {
|
|
359
|
+
skill_id: string;
|
|
360
|
+
version: string;
|
|
361
|
+
file_url: string;
|
|
362
|
+
}
|
|
363
|
+
type SkillPage = CursorPage<ProviderSkillInfo>;
|
|
364
|
+
interface FileListOptions extends CursorListOptions {
|
|
365
|
+
scope_id?: string;
|
|
366
|
+
}
|
|
367
|
+
type FilePage = CursorPage<ProviderFileInfo>;
|
|
368
|
+
interface SessionUpdateInput {
|
|
369
|
+
title?: string;
|
|
370
|
+
metadata?: Record<string, string>;
|
|
371
|
+
}
|
|
372
|
+
/** Raw AgentStudio message/event input. Provider adapters preserve the wire shape. */
|
|
373
|
+
type SessionEventInput = Record<string, unknown>;
|
|
374
|
+
interface SessionEventSendResult {
|
|
375
|
+
event_ids: string[];
|
|
376
|
+
attributes: Record<string, unknown>;
|
|
377
|
+
}
|
|
378
|
+
interface DeploymentRunInfo {
|
|
379
|
+
id: string;
|
|
380
|
+
deployment_id?: string;
|
|
381
|
+
session_id?: string | null;
|
|
382
|
+
status?: string;
|
|
383
|
+
error?: {
|
|
384
|
+
type?: string;
|
|
385
|
+
message?: string;
|
|
386
|
+
};
|
|
387
|
+
created_at?: string;
|
|
388
|
+
updated_at?: string;
|
|
389
|
+
attributes: Record<string, unknown>;
|
|
390
|
+
}
|
|
391
|
+
type DeploymentRunPage = CursorPage<DeploymentRunInfo>;
|
|
392
|
+
type ManagedAgentOperationAuth = "api_key" | "none";
|
|
393
|
+
interface ManagedAgentOperationCapability {
|
|
394
|
+
supported: boolean;
|
|
395
|
+
auth: ManagedAgentOperationAuth | null;
|
|
396
|
+
reason?: string;
|
|
397
|
+
}
|
|
398
|
+
interface ManagedAgentProviderCapabilities {
|
|
399
|
+
provider: string;
|
|
400
|
+
operations: Record<string, ManagedAgentOperationCapability>;
|
|
401
|
+
}
|
|
402
|
+
|
|
295
403
|
type MemoryMetadata = Record<string, string>;
|
|
296
404
|
interface MemoryStoreInfo {
|
|
297
405
|
id: string;
|
|
@@ -478,6 +586,9 @@ interface ProviderSessionInfo {
|
|
|
478
586
|
}
|
|
479
587
|
interface SessionFilter {
|
|
480
588
|
agent_id?: string;
|
|
589
|
+
statuses?: string[];
|
|
590
|
+
created_at_gte?: string;
|
|
591
|
+
created_at_lte?: string;
|
|
481
592
|
limit?: number;
|
|
482
593
|
page?: string;
|
|
483
594
|
}
|
|
@@ -492,17 +603,6 @@ interface SkillFile {
|
|
|
492
603
|
content: Buffer;
|
|
493
604
|
}
|
|
494
605
|
|
|
495
|
-
interface ProviderSkillInfo {
|
|
496
|
-
id: string;
|
|
497
|
-
name: string;
|
|
498
|
-
description?: string;
|
|
499
|
-
source: "custom" | "official";
|
|
500
|
-
status: "checking" | "active" | "rejected" | "deleted";
|
|
501
|
-
latest_version?: string;
|
|
502
|
-
created_at?: string;
|
|
503
|
-
updated_at?: string;
|
|
504
|
-
}
|
|
505
|
-
|
|
506
606
|
interface ResourceState {
|
|
507
607
|
address: ResourceAddress;
|
|
508
608
|
remote_id: string | null;
|
|
@@ -648,6 +748,8 @@ interface DeploymentInfo$1 {
|
|
|
648
748
|
}
|
|
649
749
|
interface DeploymentListFilter {
|
|
650
750
|
agent_id?: string;
|
|
751
|
+
/** Bailian server-side fuzzy match against deployment id or name. */
|
|
752
|
+
keyword?: string;
|
|
651
753
|
status?: "active" | "paused";
|
|
652
754
|
include_archived?: boolean;
|
|
653
755
|
limit?: number;
|
|
@@ -680,12 +782,20 @@ interface ProviderAdapter {
|
|
|
680
782
|
prefix?: string;
|
|
681
783
|
limit?: number;
|
|
682
784
|
}): Promise<CloudAgent[]>;
|
|
785
|
+
/** Cursor-preserving API listing used by command surfaces. */
|
|
786
|
+
listAgentResources?(options?: AgentListOptions): Promise<AgentPage>;
|
|
787
|
+
getRemoteAgent?(id: string, version?: number): Promise<CloudAgent>;
|
|
788
|
+
listAgentVersions?(id: string, options?: AgentVersionListOptions): Promise<AgentPage>;
|
|
683
789
|
listEnvironments?(filter?: {
|
|
684
790
|
limit?: number;
|
|
685
791
|
}): Promise<CloudEnvironment[]>;
|
|
792
|
+
listEnvironmentResources?(options?: EnvironmentListOptions): Promise<EnvironmentPage>;
|
|
793
|
+
getRemoteEnvironment?(id: string): Promise<CloudEnvironment>;
|
|
686
794
|
listVaults?(filter?: {
|
|
687
795
|
limit?: number;
|
|
688
796
|
}): Promise<CloudVault[]>;
|
|
797
|
+
listVaultResources?(options?: VaultListOptions): Promise<VaultPage>;
|
|
798
|
+
getRemoteVault?(id: string): Promise<CloudVault>;
|
|
689
799
|
getDriftSupport?(type: ResourceType): DriftSupport;
|
|
690
800
|
readComparableResource?(type: ResourceType, id: string | null, name: string): Promise<ComparableRemoteResource | null>;
|
|
691
801
|
normalizeDesiredResource?(type: ResourceType, name: string, decl: unknown): unknown | null;
|
|
@@ -700,6 +810,8 @@ interface ProviderAdapter {
|
|
|
700
810
|
deleteEnvironment(id: string, cascade?: boolean, mode?: ProviderResourceMode): Promise<void>;
|
|
701
811
|
createVault(name: string, decl: VaultDecl, mode?: ProviderResourceMode): Promise<RemoteResource>;
|
|
702
812
|
deleteVault(id: string, mode?: ProviderResourceMode): Promise<void>;
|
|
813
|
+
createCredential?(vaultId: string, credential: CredentialDecl): Promise<RemoteResource>;
|
|
814
|
+
listCredentials?(vaultId: string): Promise<VaultCredentialInfo[]>;
|
|
703
815
|
createSkill(name: string, decl: SkillDecl, files: SkillFile[], mode?: ProviderResourceMode): Promise<RemoteResource>;
|
|
704
816
|
updateSkill(id: string, name: string, decl: SkillDecl, files: SkillFile[], mode?: ProviderResourceMode): Promise<RemoteResource>;
|
|
705
817
|
deleteSkill(id: string, mode?: ProviderResourceMode): Promise<void>;
|
|
@@ -740,6 +852,12 @@ interface ProviderAdapter {
|
|
|
740
852
|
runDeployment(ctx: DeploymentContext): Promise<DeploymentRunResult$1>;
|
|
741
853
|
getDeployment(ctx: DeploymentContext): Promise<DeploymentInfo$1>;
|
|
742
854
|
listDeployments?(filter?: DeploymentListFilter): Promise<DeploymentListResult>;
|
|
855
|
+
getDeploymentById?(id: string): Promise<DeploymentInfo$1>;
|
|
856
|
+
runDeploymentById?(id: string): Promise<DeploymentRunResult$1>;
|
|
857
|
+
pauseDeploymentById?(id: string): Promise<DeploymentInfo$1>;
|
|
858
|
+
unpauseDeploymentById?(id: string): Promise<DeploymentInfo$1>;
|
|
859
|
+
listDeploymentRuns?(deploymentId: string, options?: CursorListOptions): Promise<DeploymentRunPage>;
|
|
860
|
+
getDeploymentRun?(runId: string): Promise<DeploymentRunInfo>;
|
|
743
861
|
pauseDeployment?(ctx: DeploymentContext): Promise<DeploymentInfo$1>;
|
|
744
862
|
unpauseDeployment?(ctx: DeploymentContext): Promise<DeploymentInfo$1>;
|
|
745
863
|
uploadFile(filePath: string, options?: {
|
|
@@ -765,14 +883,20 @@ interface ProviderAdapter {
|
|
|
765
883
|
}>;
|
|
766
884
|
/** List workspace user-uploaded files (newest first). Optional — only providers with a list API implement it. */
|
|
767
885
|
listFiles?(): Promise<ProviderFileInfo[]>;
|
|
886
|
+
listFileResources?(options?: FileListOptions): Promise<FilePage>;
|
|
887
|
+
downloadFileContent?(id: string): Promise<Uint8Array>;
|
|
768
888
|
/**
|
|
769
889
|
* List skills (newest first). `source` selects the catalog: "custom" (workspace-uploaded, the
|
|
770
890
|
* default) or "official" (the provider's built-in catalog). Optional — only providers with a
|
|
771
891
|
* list API implement it.
|
|
772
892
|
*/
|
|
773
893
|
listSkills?(source?: "custom" | "official"): Promise<ProviderSkillInfo[]>;
|
|
894
|
+
listSkillResources?(options?: SkillListOptions): Promise<SkillPage>;
|
|
774
895
|
/** Fetch a single skill's metadata (incl. scan `status`); used to poll create → active. */
|
|
775
896
|
getSkillInfo?(id: string): Promise<ProviderSkillInfo>;
|
|
897
|
+
listSkillVersions?(id: string, options?: SkillVersionListOptions): Promise<SkillVersionPage>;
|
|
898
|
+
getSkillVersion?(id: string, version: string): Promise<SkillVersionInfo>;
|
|
899
|
+
getSkillDownloadInfo?(id: string, version: string): Promise<SkillDownloadInfo>;
|
|
776
900
|
/**
|
|
777
901
|
* Create a skill from an already-uploaded zip's file_id and return immediately with the
|
|
778
902
|
* initial (usually `checking`) status. NON-blocking — unlike `createSkill`, it does NOT wait
|
|
@@ -782,8 +906,11 @@ interface ProviderAdapter {
|
|
|
782
906
|
createSession(bindings: SessionBindings): Promise<ProviderSessionInfo>;
|
|
783
907
|
listSessions(filter?: SessionFilter): Promise<SessionListResult>;
|
|
784
908
|
getSession(id: string): Promise<ProviderSessionInfo>;
|
|
909
|
+
updateSession?(id: string, input: SessionUpdateInput): Promise<ProviderSessionInfo>;
|
|
910
|
+
archiveSession?(id: string): Promise<ProviderSessionInfo>;
|
|
785
911
|
deleteSession(id: string): Promise<void>;
|
|
786
912
|
sendSessionMessage(sessionId: string, message: string): Promise<string | undefined>;
|
|
913
|
+
sendSessionEvents?(sessionId: string, events: SessionEventInput[]): Promise<SessionEventSendResult>;
|
|
787
914
|
streamSessionEvents(sessionId: string, options?: EventStreamOptions): AsyncIterable<ProviderSessionEvent>;
|
|
788
915
|
listSessionEvents(sessionId: string, options?: EventListOptions): Promise<ProviderSessionEventList>;
|
|
789
916
|
listModels?(): Promise<ModelInfo[]>;
|
|
@@ -930,11 +1057,18 @@ type RuntimeFeedbackSink = (event: RuntimeFeedbackEvent) => void;
|
|
|
930
1057
|
|
|
931
1058
|
interface ResourceRuntimeOptions extends DestructiveDecisionOptions {
|
|
932
1059
|
provider?: string;
|
|
1060
|
+
scope?: ResourcePlanScope;
|
|
1061
|
+
mode?: ResourceSyncMode;
|
|
933
1062
|
refresh?: boolean;
|
|
934
1063
|
refreshOnly?: boolean;
|
|
935
1064
|
quiet?: boolean;
|
|
936
1065
|
onFeedback?: RuntimeFeedbackSink;
|
|
937
1066
|
}
|
|
1067
|
+
type ResourceSyncMode = "reconcile" | "create-only";
|
|
1068
|
+
interface ResourcePlanScope {
|
|
1069
|
+
roots: ResourceAddress[];
|
|
1070
|
+
includeDependencies?: boolean;
|
|
1071
|
+
}
|
|
938
1072
|
interface ResourceRefreshResult {
|
|
939
1073
|
removed: ResourceState[];
|
|
940
1074
|
errors: Array<{
|
|
@@ -957,6 +1091,8 @@ interface ResourcePlanResult {
|
|
|
957
1091
|
refreshResult?: ResourceRefreshResult;
|
|
958
1092
|
targetProviders?: string[];
|
|
959
1093
|
destructiveActions: PlannedAction[];
|
|
1094
|
+
selectedAddresses?: ResourceAddress[];
|
|
1095
|
+
mode?: ResourceSyncMode;
|
|
960
1096
|
}
|
|
961
1097
|
type DestructivePolicy = "block" | "prompt" | "force";
|
|
962
1098
|
interface DestructiveDecisionOptions {
|
|
@@ -967,6 +1103,7 @@ interface ResourceSyncRun {
|
|
|
967
1103
|
planned: ResourcePlanResult;
|
|
968
1104
|
execution?: ResourceExecutionResult;
|
|
969
1105
|
}
|
|
1106
|
+
declare function planProjectWithStateBackend(input: BackendRuntimeInput, options?: ResourceRuntimeOptions): Promise<ResourcePlanResult>;
|
|
970
1107
|
declare function syncProjectResourcesWithStateBackend(input: BackendRuntimeInput, options?: ResourceRuntimeOptions): Promise<ResourceSyncRun>;
|
|
971
1108
|
declare function importResource(ctx: ProjectRuntimeContext, address: ResourceAddress, remoteId: string, options?: {
|
|
972
1109
|
resourceVersion?: number;
|
|
@@ -1121,6 +1258,105 @@ declare function runDeploymentForContext(ctx: ProjectRuntimeContext, name: strin
|
|
|
1121
1258
|
declare function pauseDeploymentForContext(ctx: ProjectRuntimeContext, name: string, paused: boolean, resolvedProvider?: string): Promise<DeploymentInfo$1>;
|
|
1122
1259
|
declare function getDeploymentRuntimeProviderForContext(ctx: ProjectRuntimeContext, name: string, overrideProvider?: string): string;
|
|
1123
1260
|
|
|
1261
|
+
interface ManagedApiTarget {
|
|
1262
|
+
provider?: string;
|
|
1263
|
+
}
|
|
1264
|
+
declare function listRemoteAgents(ctx: ProjectRuntimeContext, options?: ManagedApiTarget & AgentListOptions): Promise<AgentPage>;
|
|
1265
|
+
declare function getRemoteAgent(ctx: ProjectRuntimeContext, id: string, options?: ManagedApiTarget & {
|
|
1266
|
+
version?: number;
|
|
1267
|
+
}): Promise<{
|
|
1268
|
+
id: string;
|
|
1269
|
+
name?: string | undefined;
|
|
1270
|
+
description?: string | null | undefined;
|
|
1271
|
+
model?: unknown;
|
|
1272
|
+
system?: string | undefined;
|
|
1273
|
+
tools?: unknown;
|
|
1274
|
+
skills?: unknown;
|
|
1275
|
+
mcp_servers?: unknown;
|
|
1276
|
+
metadata?: Record<string, string> | undefined;
|
|
1277
|
+
version?: number | undefined;
|
|
1278
|
+
type?: string | undefined;
|
|
1279
|
+
workspace_id?: string | undefined;
|
|
1280
|
+
created_at?: string | undefined;
|
|
1281
|
+
updated_at?: string | undefined;
|
|
1282
|
+
archived_at?: string | null | undefined;
|
|
1283
|
+
attributes?: Record<string, unknown> | undefined;
|
|
1284
|
+
}>;
|
|
1285
|
+
declare function listRemoteAgentVersions(ctx: ProjectRuntimeContext, id: string, options?: ManagedApiTarget & AgentVersionListOptions): Promise<AgentPage>;
|
|
1286
|
+
declare function listRemoteEnvironments(ctx: ProjectRuntimeContext, options?: ManagedApiTarget & EnvironmentListOptions): Promise<EnvironmentPage>;
|
|
1287
|
+
declare function getRemoteEnvironment(ctx: ProjectRuntimeContext, id: string, options?: ManagedApiTarget): Promise<{
|
|
1288
|
+
id: string;
|
|
1289
|
+
name?: string | undefined;
|
|
1290
|
+
description?: string | null | undefined;
|
|
1291
|
+
config?: unknown;
|
|
1292
|
+
metadata?: Record<string, string> | undefined;
|
|
1293
|
+
scope?: string | undefined;
|
|
1294
|
+
version?: number | undefined;
|
|
1295
|
+
type?: string | undefined;
|
|
1296
|
+
workspace_id?: string | undefined;
|
|
1297
|
+
created_at?: string | undefined;
|
|
1298
|
+
updated_at?: string | undefined;
|
|
1299
|
+
archived_at?: string | null | undefined;
|
|
1300
|
+
attributes?: Record<string, unknown> | undefined;
|
|
1301
|
+
}>;
|
|
1302
|
+
declare function listRemoteVaults(ctx: ProjectRuntimeContext, options?: ManagedApiTarget & VaultListOptions): Promise<VaultPage>;
|
|
1303
|
+
declare function getRemoteVault(ctx: ProjectRuntimeContext, id: string, options?: ManagedApiTarget): Promise<{
|
|
1304
|
+
id: string;
|
|
1305
|
+
display_name?: string | undefined;
|
|
1306
|
+
metadata?: Record<string, string> | undefined;
|
|
1307
|
+
type?: string | undefined;
|
|
1308
|
+
created_at?: string | null | undefined;
|
|
1309
|
+
updated_at?: string | null | undefined;
|
|
1310
|
+
archived_at?: string | null | undefined;
|
|
1311
|
+
attributes?: Record<string, unknown> | undefined;
|
|
1312
|
+
}>;
|
|
1313
|
+
declare function listRemoteSkills(ctx: ProjectRuntimeContext, options?: ManagedApiTarget & SkillListOptions): Promise<SkillPage>;
|
|
1314
|
+
declare function getRemoteSkill(ctx: ProjectRuntimeContext, id: string, options?: ManagedApiTarget): Promise<ProviderSkillInfo>;
|
|
1315
|
+
declare function listRemoteSkillVersions(ctx: ProjectRuntimeContext, id: string, options?: ManagedApiTarget & SkillVersionListOptions): Promise<SkillVersionPage>;
|
|
1316
|
+
declare function getRemoteSkillVersion(ctx: ProjectRuntimeContext, id: string, version: string, options?: ManagedApiTarget): Promise<SkillVersionInfo>;
|
|
1317
|
+
declare function getRemoteSkillDownloadInfo(ctx: ProjectRuntimeContext, id: string, version: string, options?: ManagedApiTarget): Promise<SkillDownloadInfo>;
|
|
1318
|
+
declare function downloadRemoteSkill(ctx: ProjectRuntimeContext, id: string, version: string, options?: ManagedApiTarget): Promise<Uint8Array>;
|
|
1319
|
+
declare function listRemoteFiles(ctx: ProjectRuntimeContext, options?: ManagedApiTarget & FileListOptions): Promise<FilePage>;
|
|
1320
|
+
declare function downloadRemoteFile(ctx: ProjectRuntimeContext, id: string, options?: ManagedApiTarget): Promise<Uint8Array>;
|
|
1321
|
+
declare function updateRemoteSession(ctx: ProjectRuntimeContext, id: string, input: SessionUpdateInput, options?: ManagedApiTarget): Promise<ProviderSessionInfo>;
|
|
1322
|
+
declare function archiveRemoteSession(ctx: ProjectRuntimeContext, id: string, options?: ManagedApiTarget): Promise<ProviderSessionInfo>;
|
|
1323
|
+
declare function sendRemoteSessionEvents(ctx: ProjectRuntimeContext, id: string, events: SessionEventInput[], options?: ManagedApiTarget): Promise<SessionEventSendResult>;
|
|
1324
|
+
declare function listRemoteDeployments(ctx: ProjectRuntimeContext, options?: ManagedApiTarget & DeploymentListFilter): Promise<DeploymentListResult>;
|
|
1325
|
+
declare function getRemoteDeployment(ctx: ProjectRuntimeContext, id: string, options?: ManagedApiTarget): Promise<DeploymentInfo$1>;
|
|
1326
|
+
declare function runRemoteDeployment(ctx: ProjectRuntimeContext, id: string, options?: ManagedApiTarget): Promise<DeploymentRunResult$1>;
|
|
1327
|
+
declare function setRemoteDeploymentPaused(ctx: ProjectRuntimeContext, id: string, paused: boolean, options?: ManagedApiTarget): Promise<DeploymentInfo$1>;
|
|
1328
|
+
declare function listRemoteDeploymentRuns(ctx: ProjectRuntimeContext, deploymentId: string, options?: ManagedApiTarget & {
|
|
1329
|
+
limit?: number;
|
|
1330
|
+
page?: string;
|
|
1331
|
+
}): Promise<DeploymentRunPage>;
|
|
1332
|
+
declare function getRemoteDeploymentRun(ctx: ProjectRuntimeContext, runId: string, options?: ManagedApiTarget): Promise<DeploymentRunInfo>;
|
|
1333
|
+
declare function getManagedAgentProviderCapabilities(provider: string): ManagedAgentProviderCapabilities;
|
|
1334
|
+
|
|
1335
|
+
interface VaultCredentialCreateOptions {
|
|
1336
|
+
provider?: string;
|
|
1337
|
+
refresh?: boolean;
|
|
1338
|
+
quiet?: boolean;
|
|
1339
|
+
/** Set false only for an offline preview; create always requires the remote duplicate check. */
|
|
1340
|
+
checkRemote?: boolean;
|
|
1341
|
+
}
|
|
1342
|
+
interface VaultCredentialCreatePlan {
|
|
1343
|
+
provider: string;
|
|
1344
|
+
vault: string;
|
|
1345
|
+
vaultRemoteId: string;
|
|
1346
|
+
credential: string;
|
|
1347
|
+
remoteChecked: boolean;
|
|
1348
|
+
reuseRemote: boolean;
|
|
1349
|
+
remoteCredentialId?: string;
|
|
1350
|
+
}
|
|
1351
|
+
interface VaultCredentialCreateResult extends VaultCredentialCreatePlan {
|
|
1352
|
+
credentialId: string;
|
|
1353
|
+
adopted: boolean;
|
|
1354
|
+
}
|
|
1355
|
+
declare function planVaultCredentialCreate(ctx: ProjectRuntimeContext, vaultName: string, credentialName: string, options?: VaultCredentialCreateOptions): Promise<VaultCredentialCreatePlan>;
|
|
1356
|
+
declare function planVaultCredentialCreateWithStateBackend(input: BackendRuntimeInput, vaultName: string, credentialName: string, options?: VaultCredentialCreateOptions): Promise<VaultCredentialCreatePlan>;
|
|
1357
|
+
declare function createVaultCredential(ctx: ProjectRuntimeContext, vaultName: string, credentialName: string, options?: VaultCredentialCreateOptions): Promise<VaultCredentialCreateResult>;
|
|
1358
|
+
declare function createVaultCredentialWithStateBackend(input: BackendRuntimeInput, vaultName: string, credentialName: string, options?: VaultCredentialCreateOptions): Promise<VaultCredentialCreateResult>;
|
|
1359
|
+
|
|
1124
1360
|
type DestroyResourceStatus = "success" | "failed" | "blocked" | "skipped";
|
|
1125
1361
|
type DestroyResourceResultReason = "destroyed" | "reference_removed" | "already_gone" | "cascade_required" | "provider_missing" | "failed" | "skipped";
|
|
1126
1362
|
interface DestroyResourceResult {
|
|
@@ -1234,6 +1470,7 @@ interface AgentMcpBuildInput {
|
|
|
1234
1470
|
}>;
|
|
1235
1471
|
}
|
|
1236
1472
|
interface AgentBuildInput {
|
|
1473
|
+
name?: string;
|
|
1237
1474
|
description?: string;
|
|
1238
1475
|
model?: AgentDecl["model"];
|
|
1239
1476
|
instructions?: string;
|
|
@@ -1257,10 +1494,20 @@ interface BuiltAgent {
|
|
|
1257
1494
|
*/
|
|
1258
1495
|
declare function buildAgentDecl(base: AgentDecl | undefined, input: AgentBuildInput): BuiltAgent;
|
|
1259
1496
|
|
|
1497
|
+
interface AgentResourcePlan {
|
|
1498
|
+
agentId: string;
|
|
1499
|
+
provider: string;
|
|
1500
|
+
actions: PlannedAction[];
|
|
1501
|
+
diagnostics: Diagnostic[];
|
|
1502
|
+
destructiveActions: PlannedAction[];
|
|
1503
|
+
planned: ResourcePlanResult;
|
|
1504
|
+
}
|
|
1260
1505
|
interface AgentResourcePlanOptions {
|
|
1261
1506
|
refresh?: boolean;
|
|
1262
1507
|
quiet?: boolean;
|
|
1508
|
+
mode?: AgentResourceSyncMode;
|
|
1263
1509
|
}
|
|
1510
|
+
type AgentResourceSyncMode = ResourceSyncMode;
|
|
1264
1511
|
interface AgentResourceSyncOptions extends AgentResourcePlanOptions {
|
|
1265
1512
|
policy?: DestructivePolicy;
|
|
1266
1513
|
confirm?: (actions: PlannedAction[]) => boolean | Promise<boolean>;
|
|
@@ -1320,6 +1567,8 @@ declare function getAgent(ctx: ProjectRuntimeContext, agentId: string): AgentDef
|
|
|
1320
1567
|
declare function listAgentsWithReadiness(ctx: ProjectRuntimeContext, options?: {
|
|
1321
1568
|
refresh?: boolean;
|
|
1322
1569
|
}): Promise<AgentWithReadiness[]>;
|
|
1570
|
+
declare function planAgentResources(ctx: ProjectRuntimeContext, agentId: string, options?: AgentResourcePlanOptions): Promise<AgentResourcePlan>;
|
|
1571
|
+
declare function planAgentResourcesWithStateBackend(input: BackendRuntimeInput, agentId: string, options?: AgentResourcePlanOptions): Promise<AgentResourcePlan>;
|
|
1323
1572
|
declare function syncAgentResourcesWithStateBackend(input: BackendRuntimeInput, agentId: string, options?: AgentResourceSyncOptions): Promise<AgentSyncRun>;
|
|
1324
1573
|
|
|
1325
1574
|
interface SessionCreateOptions {
|
|
@@ -1411,12 +1660,7 @@ declare function listSessionSummaries(ctx: ProjectRuntimeContext, options?: Sess
|
|
|
1411
1660
|
}): Promise<SessionSummaryList>;
|
|
1412
1661
|
declare function getSession(ctx: ProjectRuntimeContext, sessionId: string, provider?: string): Promise<ProviderSessionInfo>;
|
|
1413
1662
|
declare function deleteSession(ctx: ProjectRuntimeContext, sessionId: string, provider?: string): Promise<void>;
|
|
1414
|
-
declare function listSessionEvents(ctx: ProjectRuntimeContext, sessionId: string, options?: SessionRuntimeTarget &
|
|
1415
|
-
limit?: number;
|
|
1416
|
-
order?: string;
|
|
1417
|
-
page_token?: string;
|
|
1418
|
-
page?: string;
|
|
1419
|
-
}): Promise<ProviderSessionEventList>;
|
|
1663
|
+
declare function listSessionEvents(ctx: ProjectRuntimeContext, sessionId: string, options?: SessionRuntimeTarget & EventListOptions): Promise<ProviderSessionEventList>;
|
|
1420
1664
|
/**
|
|
1421
1665
|
* Upload a file's raw bytes to the resolved provider's Files API and return its metadata.
|
|
1422
1666
|
* Content-based (no filesystem) so server contexts can forward browser uploads directly.
|
|
@@ -1456,9 +1700,9 @@ declare function createSkillFromFileId(ctx: ProjectRuntimeContext, fileId: strin
|
|
|
1456
1700
|
/** Delete a custom skill by id from the resolved provider's Skills API. */
|
|
1457
1701
|
declare function deleteSkill(ctx: ProjectRuntimeContext, id: string, options?: SessionRuntimeTarget): Promise<void>;
|
|
1458
1702
|
/**
|
|
1459
|
-
* Subscribe to a session's
|
|
1460
|
-
*
|
|
1461
|
-
*
|
|
1703
|
+
* Subscribe to a session's event stream by id. Providers with native cursor support receive
|
|
1704
|
+
* `after_id` directly; providers without it resume by replaying paginated history and polling
|
|
1705
|
+
* for new events with event-id de-duplication.
|
|
1462
1706
|
*/
|
|
1463
1707
|
declare function streamSessionEvents(ctx: ProjectRuntimeContext, sessionId: string, options?: SessionRuntimeTarget & EventStreamOptions): AsyncIterable<ProviderSessionEvent>;
|
|
1464
1708
|
|
|
@@ -1543,4 +1787,14 @@ declare class LocalFileStateBackend implements StateBackend {
|
|
|
1543
1787
|
/** Normalize a skill zip and extract its entries to SkillFile[]. */
|
|
1544
1788
|
declare function extractSkillZipFiles(raw: Buffer): Promise<SkillFile[]>;
|
|
1545
1789
|
|
|
1546
|
-
|
|
1790
|
+
interface SkillSourceInspection {
|
|
1791
|
+
name: string;
|
|
1792
|
+
sourcePath: string;
|
|
1793
|
+
files: SkillFile[];
|
|
1794
|
+
}
|
|
1795
|
+
/** Inspect and normalize a local Skill directory, zip, or single SKILL.md. */
|
|
1796
|
+
declare function inspectSkillSource(source: string, options?: {
|
|
1797
|
+
basePath?: string;
|
|
1798
|
+
}): Promise<SkillSourceInspection>;
|
|
1799
|
+
|
|
1800
|
+
export { AGENTS_CONFIG_PROVIDERS, AGENTS_PROVIDER_FIELDS, type AgentBuildInput, AgentDefinition, type AgentListOptions, type AgentMcpBuildInput, type AgentPage, type AgentResourcePlan, type AgentResourcePlanOptions, type AgentResourceSyncMode, type AgentResourceSyncOptions, type AgentSkillBuildInput, AgentSyncRun, type AgentVersionListOptions, AgentWithReadiness, ApiError, type BackendRuntimeInput, type BatchCreateMemoryInput, type BatchCreateMemoryResult, CloudAgent, CloudEnvironment, CloudVault, type CollectedSessionEvents, ConflictError, type CreateMemoryInput, type CreateMemoryStoreInput, type CredentialDecl, type CursorListOptions, type CursorPage, type DeploymentDecl, type DeploymentInfo$1 as DeploymentInfo, type DeploymentListFilter, type DeploymentListResult, type DeploymentRunInfo, type DeploymentRunPage, type DeploymentRunResult$1 as DeploymentRunResult, type DestroyDefaultMemoryStoreResult, type DestroyResourceResult, type DestructivePolicy, Diagnostic, type EnvironmentDecl, type EnvironmentListOptions, type EnvironmentPage, EventListOptions, EventStreamOptions, type FetchLike, type FileListOptions, type FilePage, type IStateManager, type LoadedProjectConfig, LocalFileStateBackend, type ManagedAgentOperationAuth, type ManagedAgentOperationCapability, type ManagedAgentProviderCapabilities, type ManagedApiTarget, 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 ProjectConfig, type ProjectRuntimeContext, type ProviderConfig, type ProviderConfigProvider, ProviderFileInfo, ProviderSessionEvent, ProviderSessionEventList, type ProviderSessionInfo, type ProviderSkillInfo, type ResolvedProjectConfig, type ResourceActionResult, ResourceAddress, type ResourceExecutionResult, type ResourcePlanResult, type ResourcePlanScope, type ResourceRefreshResult, type ResourceRuntimeOptions, type ResourceState, type ResourceSyncMode, type ResourceSyncRun, ResourceType, type RuntimeFeedbackEvent, type RuntimeFeedbackSink, type SecretPlaceholder, type SessionEventInput, type SessionEventSendResult, type SessionFilter, type SessionListResult, type SessionUpdateInput, type SkillDecl, type SkillDownloadInfo, type SkillFile, type SkillListOptions, type SkillPage, type SkillSourceInspection, type SkillVersionInfo, type SkillVersionListOptions, type SkillVersionPage, StateManager, type StateScope, type SyncProjectOptions, type SyncProjectResult, type UpdateMemoryInput, type UpdateMemoryStoreInput, UserError, type ValidateProjectConfigOptions, type VaultCredentialCreateOptions, type VaultCredentialCreatePlan, type VaultCredentialCreateResult, type VaultCredentialInfo, type VaultDecl, type VaultListOptions, type VaultPage, applyProviderConfigToEnv, archiveCloudAgent, archiveMemoryStore, archiveRemoteSession, areRuntimeCredentialsReady, batchCreateMemories, bootstrapRuntimeCredentials, bootstrapRuntimeCredentialsSync, buildAgentDecl, collectConfigReferences, createCloudEnvironment, createCloudVault, createMemory, createMemoryStore, createProjectRuntime, createSessionForAgent, createSkillFromFileId, createVaultCredential, createVaultCredentialWithStateBackend, decideDestructive, deleteCloudEnvironment, deleteCloudVault, deleteFile, deleteMemory, deleteMemoryStore, deleteSession, deleteSkill, destroyPlannedProjectResources, downloadRemoteFile, downloadRemoteSkill, executePlannedProject, extractSkillZipFiles, getAgent, getDeploymentDetailsForContext, getDeploymentRuntimeProviderForContext, getFileDownloadUrl, getFileInfo, getManagedAgentProviderCapabilities, getMemory, getMemoryProviderCapabilities, getMemoryStore, getMemoryVersion, getRemoteAgent, getRemoteDeployment, getRemoteDeploymentRun, getRemoteEnvironment, getRemoteSkill, getRemoteSkillDownloadInfo, getRemoteSkillVersion, getRemoteVault, getSession, getSkillInfo, importResource, inspectSkillSource, isTerminalSessionStatus, listAgentsWithReadiness, listCloudAgents, listCloudEnvironments, listCloudVaults, listDeploymentsForContext, listFiles, listMemories, listMemoryStores, listMemoryVersions, listProviderModelsForContext, listProviderNames, listRemoteAgentVersions, listRemoteAgents, listRemoteDeploymentRuns, listRemoteDeployments, listRemoteDeploymentsForContext, listRemoteEnvironments, listRemoteFiles, listRemoteSkillVersions, listRemoteSkills, listRemoteVaults, listSessionEvents, listSessionSummaries, listSkills, loadDotEnv, loadProviderConfigIntoEnv, loadProviderConfigIntoEnvSync, migrateConfig, parseStateAddress, pauseDeploymentForContext, planAgentResources, planAgentResourcesWithStateBackend, planDestroyProjectContext, planProjectContext, planProjectWithStateBackend, planVaultCredentialCreate, planVaultCredentialCreateWithStateBackend, prepareInitialSessionPrompt, preparePromptForProvider, prependFileHint, providerConfigPath, readProjectRuntime, redactMemoryVersion, resolveActiveProvider, resolveProjectConfig, resolveProjectConfigFromObject, resolveProviderConfigFromEnv, resolveRepositoryMountPath, resolveSessionProvider, resolveSyncProvider, rewriteFileMentions, runDeploymentForContext, runRemoteDeployment, sendRemoteSessionEvents, sendSessionMessagePolling, sendSessionMessageStreaming, setDefaultFetch, setRemoteDeploymentPaused, startSessionRun, startSessionRunPolling, streamSessionEvents, syncAgentResourcesWithStateBackend, syncProjectResourcesWithStateBackend, syncProviderResourcesFromContext, syncProviderResourcesFromEnv, updateMemory, updateMemoryStore, updateRemoteSession, uploadFile, validateProjectConfig, writeProjectRuntime };
|