@openagentpack/sdk 0.6.0 → 0.7.1

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.
@@ -0,0 +1,98 @@
1
+ import { U as UserError } from './errors-BcVE1wZB.js';
2
+ import { D as Diagnostic } from './dto-BT1Q1Ii6.js';
3
+
4
+ declare class DirectoryProjectMutationConflictError extends UserError {
5
+ readonly status = 409;
6
+ constructor(message: string);
7
+ }
8
+ interface DirectorySnapshotFile {
9
+ path: string;
10
+ mode: number;
11
+ content: Uint8Array;
12
+ }
13
+ interface DirectoryProjectSnapshot {
14
+ project_revision: string;
15
+ canonical_yaml: string;
16
+ files: DirectorySnapshotFile[];
17
+ }
18
+ interface DirectoryProjectVersion {
19
+ version_id: string;
20
+ short_version: string;
21
+ parent_version: string | null;
22
+ tree_hash: string;
23
+ yaml_hash: string;
24
+ message: string;
25
+ created_by: string;
26
+ created_at: string;
27
+ }
28
+ interface DirectoryProjectVersionStatus {
29
+ initialized: boolean;
30
+ enabled: boolean;
31
+ store_root: string;
32
+ head_version: string | null;
33
+ source_status: "clean" | "modified" | "unversioned";
34
+ project_revision: string;
35
+ write_blockers: string[];
36
+ restore_blockers: string[];
37
+ }
38
+ interface DirectoryVersionFileChange {
39
+ path: string;
40
+ change: "create" | "update" | "delete";
41
+ binary: boolean;
42
+ before?: string;
43
+ after?: string;
44
+ }
45
+ interface DirectoryProjectVersionPreview {
46
+ version_id: string;
47
+ base_head_version: string;
48
+ base_project_revision: string;
49
+ before_yaml: string;
50
+ after_yaml: string;
51
+ changes: DirectoryVersionFileChange[];
52
+ diagnostics: Diagnostic[];
53
+ can_restore: boolean;
54
+ blockers: string[];
55
+ }
56
+ interface PreparedDirectoryProjectVersion {
57
+ projectRoot: string;
58
+ storeRoot: string;
59
+ baseHeadVersion: string | null;
60
+ snapshot: DirectoryProjectSnapshot;
61
+ treeHash: string;
62
+ needsVersion: boolean;
63
+ versioningEnabled: boolean;
64
+ leaseToken: string;
65
+ }
66
+ interface DirectoryProjectVersionAdapter {
67
+ readSnapshot(): Promise<DirectoryProjectSnapshot>;
68
+ restoreSnapshot(snapshot: DirectoryProjectSnapshot, baseProjectRevision: string): Promise<void>;
69
+ }
70
+ interface DirectoryProjectVersionService {
71
+ status(): Promise<DirectoryProjectVersionStatus>;
72
+ enable(message?: string): Promise<{
73
+ version: DirectoryProjectVersion | null;
74
+ versioning: DirectoryProjectVersionStatus;
75
+ }>;
76
+ disable(): Promise<DirectoryProjectVersionStatus>;
77
+ listVersions(input?: {
78
+ cursor?: string;
79
+ limit?: number;
80
+ }): Promise<{
81
+ versions: DirectoryProjectVersion[];
82
+ next_cursor: string | null;
83
+ }>;
84
+ previewVersion(versionId: string): Promise<DirectoryProjectVersionPreview>;
85
+ restoreVersion(versionId: string, base: {
86
+ headVersion: string;
87
+ projectRevision: string;
88
+ }): Promise<DirectoryProjectVersionPreview>;
89
+ prepareVersion(snapshot?: DirectoryProjectSnapshot): Promise<PreparedDirectoryProjectVersion>;
90
+ commitPrepared(prepared: PreparedDirectoryProjectVersion, message?: string): Promise<DirectoryProjectVersion | null>;
91
+ releasePrepared(prepared: PreparedDirectoryProjectVersion | null): Promise<void>;
92
+ }
93
+ declare function createDirectoryProjectVersionService(input: {
94
+ projectRoot: string;
95
+ adapter: DirectoryProjectVersionAdapter;
96
+ }): DirectoryProjectVersionService;
97
+
98
+ export { DirectoryProjectMutationConflictError as D, type PreparedDirectoryProjectVersion as P, type DirectoryProjectSnapshot as a, type DirectoryProjectVersion as b, type DirectoryProjectVersionAdapter as c, type DirectoryProjectVersionPreview as d, type DirectoryProjectVersionService as e, type DirectoryProjectVersionStatus as f, type DirectorySnapshotFile as g, type DirectoryVersionFileChange as h, createDirectoryProjectVersionService as i };
@@ -1097,53 +1097,4 @@ declare const ListSessionEventsResponseSchema: z.ZodObject<{
1097
1097
  }, z.core.$strip>;
1098
1098
  type ListSessionEventsResponse = z.infer<typeof ListSessionEventsResponseSchema>;
1099
1099
 
1100
- interface ProviderSessionEvent {
1101
- type: SessionEventType;
1102
- raw_type: string;
1103
- /** Stable per-event id when the provider supplies one; used to de-dupe history replay vs. live stream. */
1104
- id?: string;
1105
- role?: string;
1106
- content?: string;
1107
- tool_name?: string;
1108
- tool_input?: string;
1109
- status?: string;
1110
- stop_reason?: string;
1111
- /** Child-agent thread id when a Managed Agents multi-agent event carries one. */
1112
- session_thread_id?: string;
1113
- /**
1114
- * A file the agent delivered to the provider's Files API (qoder DeliverArtifacts /
1115
- * bailian download_file). Structured so the webui can show a download card without
1116
- * scraping tool-result free text. Populated by the provider mapper; surfaced onto the
1117
- * contract event as `metadata.artifact` by the shared sanitizer.
1118
- */
1119
- artifact?: {
1120
- file_id: string;
1121
- filename?: string;
1122
- content_type?: string;
1123
- size?: number;
1124
- };
1125
- raw: Record<string, unknown>;
1126
- }
1127
- interface EventListOptions {
1128
- limit?: number;
1129
- after_id?: string;
1130
- order?: string;
1131
- page_token?: string;
1132
- /** Legacy alias for page_token used by some provider adapters. */
1133
- page?: string;
1134
- types?: string[];
1135
- created_at_gt?: string;
1136
- created_at_gte?: string;
1137
- created_at_lt?: string;
1138
- created_at_lte?: string;
1139
- }
1140
- interface EventStreamOptions {
1141
- after_id?: string;
1142
- }
1143
- interface ProviderSessionEventList {
1144
- events: ProviderSessionEvent[];
1145
- has_more: boolean;
1146
- next_page?: string;
1147
- }
1148
-
1149
- export { type ListCloudAgentsResponse as $, type AgentDefinition as A, AgentSyncResultSchema as B, type CloudAgent as C, type Diagnostic as D, type EventStreamOptions as E, AgentSyncRunSchema as F, type AgentSyncStatus as G, AgentSyncStatusSchema as H, AgentWithReadinessSchema as I, CloudAgentSchema as J, CloudEnvironmentSchema as K, CloudVaultSchema as L, type CreateSessionRequest as M, CreateSessionRequestSchema as N, type CreateSessionResponse as O, type ProviderSessionEvent as P, CreateSessionResponseSchema as Q, type ResourceAddress as R, DiagnosticSchema as S, type DiagnosticSeverity as T, DiagnosticSeveritySchema as U, type DriftKind as V, DriftKindSchema as W, type GetSessionRequest as X, GetSessionRequestSchema as Y, KNOWN_SESSION_EVENT_TYPES as Z, type KnownSessionEventType as _, type CloudEnvironment as a, ListCloudAgentsResponseSchema as a0, type ListCloudEnvironmentsResponse as a1, ListCloudEnvironmentsResponseSchema as a2, type ListSessionEventsRequest as a3, ListSessionEventsRequestSchema as a4, type ListSessionEventsResponse as a5, ListSessionEventsResponseSchema as a6, type ListSessionsRequest as a7, ListSessionsRequestSchema as a8, type ListSessionsResponse as a9, ListSessionsResponseSchema as aa, type PlanReadinessImpact as ab, PlanReadinessImpactSchema as ac, PlannedActionSchema as ad, ResourceAddressSchema as ae, ResourceTypeSchema as af, type SendEventRequest as ag, SendEventRequestSchema as ah, type SendEventResponse as ai, SendEventResponseSchema as aj, type Session as ak, type SessionAgent as al, SessionAgentSchema as am, type SessionContentBlock as an, SessionContentBlockSchema as ao, type SessionEvent as ap, SessionEventSchema as aq, type SessionEventType as ar, type SessionEventTypeName as as, SessionEventTypeSchema as at, SessionSchema as au, type CloudVault as b, type ResourceType as c, type EventListOptions as d, type ProviderSessionEventList as e, type PlannedAction as f, type AgentReadiness as g, type AgentWithReadiness as h, type AgentSyncRun as i, type ActionType as j, ActionTypeSchema as k, AgentDefinitionSchema as l, type AgentDriftSeverity as m, AgentDriftSeveritySchema as n, type AgentModel as o, AgentModelSchema as p, AgentReadinessSchema as q, type AgentReadinessStatus as r, AgentReadinessStatusSchema as s, type AgentRecoveryAction as t, AgentRecoveryActionSchema as u, type AgentSkillRef as v, AgentSkillRefSchema as w, type AgentSyncReason as x, AgentSyncReasonSchema as y, type AgentSyncResult as z };
1100
+ export { type ListSessionEventsRequest as $, type AgentDefinition as A, AgentSyncStatusSchema as B, type CloudAgent as C, type Diagnostic as D, AgentWithReadinessSchema as E, CloudAgentSchema as F, CloudEnvironmentSchema as G, CloudVaultSchema as H, type CreateSessionRequest as I, CreateSessionRequestSchema as J, type CreateSessionResponse as K, CreateSessionResponseSchema as L, DiagnosticSchema as M, type DiagnosticSeverity as N, DiagnosticSeveritySchema as O, type PlannedAction as P, type DriftKind as Q, type ResourceType as R, DriftKindSchema as S, type GetSessionRequest as T, GetSessionRequestSchema as U, KNOWN_SESSION_EVENT_TYPES as V, type KnownSessionEventType as W, type ListCloudAgentsResponse as X, ListCloudAgentsResponseSchema as Y, type ListCloudEnvironmentsResponse as Z, ListCloudEnvironmentsResponseSchema as _, type AgentReadiness as a, ListSessionEventsRequestSchema as a0, type ListSessionEventsResponse as a1, ListSessionEventsResponseSchema as a2, type ListSessionsRequest as a3, ListSessionsRequestSchema as a4, type ListSessionsResponse as a5, ListSessionsResponseSchema as a6, type PlanReadinessImpact as a7, PlanReadinessImpactSchema as a8, PlannedActionSchema as a9, ResourceAddressSchema as aa, ResourceTypeSchema as ab, type SendEventRequest as ac, SendEventRequestSchema as ad, type SendEventResponse as ae, SendEventResponseSchema as af, type Session as ag, type SessionAgent as ah, SessionAgentSchema as ai, type SessionContentBlock as aj, SessionContentBlockSchema as ak, type SessionEvent as al, SessionEventSchema as am, type SessionEventType as an, type SessionEventTypeName as ao, SessionEventTypeSchema as ap, SessionSchema as aq, type AgentWithReadiness as b, type CloudEnvironment as c, type CloudVault as d, type AgentSyncRun as e, type ResourceAddress as f, type ActionType as g, ActionTypeSchema as h, AgentDefinitionSchema as i, type AgentDriftSeverity as j, AgentDriftSeveritySchema as k, type AgentModel as l, AgentModelSchema as m, AgentReadinessSchema as n, type AgentReadinessStatus as o, AgentReadinessStatusSchema as p, type AgentRecoveryAction as q, AgentRecoveryActionSchema as r, type AgentSkillRef as s, AgentSkillRefSchema as t, type AgentSyncReason as u, AgentSyncReasonSchema as v, type AgentSyncResult as w, AgentSyncResultSchema as x, AgentSyncRunSchema as y, type AgentSyncStatus as z };
@@ -0,0 +1,5 @@
1
+ declare class UserError extends Error {
2
+ constructor(message: string);
3
+ }
4
+
5
+ export { UserError as U };