@openagentpack/sdk 0.5.0 → 0.7.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/README.md +17 -0
- package/dist/chunk-56BB46YT.js +1191 -0
- package/dist/chunk-HIK5DY4I.js +2429 -0
- package/dist/chunk-ZBJDMUJT.js +6989 -0
- package/dist/directory-nY2Slsfi.d.ts +98 -0
- package/dist/{session-event-5kLRNMHC.d.ts → dto-BT1Q1Ii6.d.ts} +14 -50
- package/dist/errors-BcVE1wZB.d.ts +5 -0
- package/dist/index.d.ts +22 -1102
- package/dist/index.js +353 -9280
- package/dist/project-versions.d.ts +105 -0
- package/dist/project-versions.js +35 -0
- package/dist/project-workspace.d.ts +150 -0
- package/dist/project-workspace.js +1720 -0
- package/dist/resource-runtime-DZDY45_Q.d.ts +1126 -0
- package/dist/session-event-DB_YlDiK.d.ts +52 -0
- package/dist/session-events.d.ts +2 -1
- package/package.json +13 -1
|
@@ -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 };
|
|
@@ -590,6 +590,13 @@ declare const AgentSyncStatusSchema: z.ZodEnum<{
|
|
|
590
590
|
failed: "failed";
|
|
591
591
|
}>;
|
|
592
592
|
type AgentSyncStatus = z.infer<typeof AgentSyncStatusSchema>;
|
|
593
|
+
declare const AgentSyncReasonSchema: z.ZodEnum<{
|
|
594
|
+
destructive_blocked: "destructive_blocked";
|
|
595
|
+
cancelled: "cancelled";
|
|
596
|
+
diagnostic_error: "diagnostic_error";
|
|
597
|
+
plan_stale: "plan_stale";
|
|
598
|
+
}>;
|
|
599
|
+
type AgentSyncReason = z.infer<typeof AgentSyncReasonSchema>;
|
|
593
600
|
declare const AgentSyncResultSchema: z.ZodObject<{
|
|
594
601
|
action: z.ZodObject<{
|
|
595
602
|
action: z.ZodEnum<{
|
|
@@ -678,6 +685,12 @@ declare const AgentSyncRunSchema: z.ZodObject<{
|
|
|
678
685
|
blocked: "blocked";
|
|
679
686
|
failed: "failed";
|
|
680
687
|
}>;
|
|
688
|
+
reason: z.ZodOptional<z.ZodEnum<{
|
|
689
|
+
destructive_blocked: "destructive_blocked";
|
|
690
|
+
cancelled: "cancelled";
|
|
691
|
+
diagnostic_error: "diagnostic_error";
|
|
692
|
+
plan_stale: "plan_stale";
|
|
693
|
+
}>>;
|
|
681
694
|
actions: z.ZodArray<z.ZodObject<{
|
|
682
695
|
action: z.ZodEnum<{
|
|
683
696
|
create: "create";
|
|
@@ -1084,53 +1097,4 @@ declare const ListSessionEventsResponseSchema: z.ZodObject<{
|
|
|
1084
1097
|
}, z.core.$strip>;
|
|
1085
1098
|
type ListSessionEventsResponse = z.infer<typeof ListSessionEventsResponseSchema>;
|
|
1086
1099
|
|
|
1087
|
-
|
|
1088
|
-
type: SessionEventType;
|
|
1089
|
-
raw_type: string;
|
|
1090
|
-
/** Stable per-event id when the provider supplies one; used to de-dupe history replay vs. live stream. */
|
|
1091
|
-
id?: string;
|
|
1092
|
-
role?: string;
|
|
1093
|
-
content?: string;
|
|
1094
|
-
tool_name?: string;
|
|
1095
|
-
tool_input?: string;
|
|
1096
|
-
status?: string;
|
|
1097
|
-
stop_reason?: string;
|
|
1098
|
-
/** Child-agent thread id when a Managed Agents multi-agent event carries one. */
|
|
1099
|
-
session_thread_id?: string;
|
|
1100
|
-
/**
|
|
1101
|
-
* A file the agent delivered to the provider's Files API (qoder DeliverArtifacts /
|
|
1102
|
-
* bailian download_file). Structured so the webui can show a download card without
|
|
1103
|
-
* scraping tool-result free text. Populated by the provider mapper; surfaced onto the
|
|
1104
|
-
* contract event as `metadata.artifact` by the shared sanitizer.
|
|
1105
|
-
*/
|
|
1106
|
-
artifact?: {
|
|
1107
|
-
file_id: string;
|
|
1108
|
-
filename?: string;
|
|
1109
|
-
content_type?: string;
|
|
1110
|
-
size?: number;
|
|
1111
|
-
};
|
|
1112
|
-
raw: Record<string, unknown>;
|
|
1113
|
-
}
|
|
1114
|
-
interface EventListOptions {
|
|
1115
|
-
limit?: number;
|
|
1116
|
-
after_id?: string;
|
|
1117
|
-
order?: string;
|
|
1118
|
-
page_token?: string;
|
|
1119
|
-
/** Legacy alias for page_token used by some provider adapters. */
|
|
1120
|
-
page?: string;
|
|
1121
|
-
types?: string[];
|
|
1122
|
-
created_at_gt?: string;
|
|
1123
|
-
created_at_gte?: string;
|
|
1124
|
-
created_at_lt?: string;
|
|
1125
|
-
created_at_lte?: string;
|
|
1126
|
-
}
|
|
1127
|
-
interface EventStreamOptions {
|
|
1128
|
-
after_id?: string;
|
|
1129
|
-
}
|
|
1130
|
-
interface ProviderSessionEventList {
|
|
1131
|
-
events: ProviderSessionEvent[];
|
|
1132
|
-
has_more: boolean;
|
|
1133
|
-
next_page?: string;
|
|
1134
|
-
}
|
|
1135
|
-
|
|
1136
|
-
export { type ListCloudEnvironmentsResponse as $, type AgentDefinition as A, type AgentSyncStatus as B, type CloudAgent as C, type Diagnostic as D, type EventStreamOptions as E, AgentSyncStatusSchema as F, AgentWithReadinessSchema as G, CloudAgentSchema as H, CloudEnvironmentSchema as I, CloudVaultSchema as J, type CreateSessionRequest as K, CreateSessionRequestSchema as L, type CreateSessionResponse as M, CreateSessionResponseSchema as N, DiagnosticSchema as O, type ProviderSessionEvent as P, type DiagnosticSeverity as Q, type ResourceAddress as R, DiagnosticSeveritySchema as S, type DriftKind as T, DriftKindSchema as U, type GetSessionRequest as V, GetSessionRequestSchema as W, KNOWN_SESSION_EVENT_TYPES as X, type KnownSessionEventType as Y, type ListCloudAgentsResponse as Z, ListCloudAgentsResponseSchema as _, type CloudEnvironment as a, ListCloudEnvironmentsResponseSchema as a0, type ListSessionEventsRequest as a1, ListSessionEventsRequestSchema as a2, type ListSessionEventsResponse as a3, ListSessionEventsResponseSchema as a4, type ListSessionsRequest as a5, ListSessionsRequestSchema as a6, type ListSessionsResponse as a7, ListSessionsResponseSchema as a8, type PlanReadinessImpact as a9, PlanReadinessImpactSchema as aa, PlannedActionSchema as ab, ResourceAddressSchema as ac, ResourceTypeSchema as ad, type SendEventRequest as ae, SendEventRequestSchema as af, type SendEventResponse as ag, SendEventResponseSchema as ah, type Session as ai, type SessionAgent as aj, SessionAgentSchema as ak, type SessionContentBlock as al, SessionContentBlockSchema as am, type SessionEvent as an, SessionEventSchema as ao, type SessionEventType as ap, type SessionEventTypeName as aq, SessionEventTypeSchema as ar, SessionSchema as as, type CloudVault as b, type ResourceType as c, type EventListOptions as d, type ProviderSessionEventList as e, type PlannedAction as f, type AgentWithReadiness as g, type AgentSyncRun as h, type ActionType as i, ActionTypeSchema as j, AgentDefinitionSchema as k, type AgentDriftSeverity as l, AgentDriftSeveritySchema as m, type AgentModel as n, AgentModelSchema as o, type AgentReadiness 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 AgentSyncResult as x, AgentSyncResultSchema as y, AgentSyncRunSchema 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 };
|