@agent-os-sdk/client 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/dist/client/AgentOsClient.d.ts +28 -4
  2. package/dist/client/AgentOsClient.d.ts.map +1 -1
  3. package/dist/client/AgentOsClient.js +40 -3
  4. package/dist/generated/openapi.d.ts +93 -0
  5. package/dist/generated/openapi.d.ts.map +1 -1
  6. package/dist/index.d.ts +9 -0
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +10 -0
  9. package/dist/modules/approvals.d.ts +78 -0
  10. package/dist/modules/approvals.d.ts.map +1 -0
  11. package/dist/modules/approvals.js +157 -0
  12. package/dist/modules/artifacts.d.ts +100 -0
  13. package/dist/modules/artifacts.d.ts.map +1 -0
  14. package/dist/modules/artifacts.js +217 -0
  15. package/dist/modules/budgets.d.ts +104 -0
  16. package/dist/modules/budgets.d.ts.map +1 -0
  17. package/dist/modules/budgets.js +161 -0
  18. package/dist/modules/builder.d.ts +2 -2
  19. package/dist/modules/builder.d.ts.map +1 -1
  20. package/dist/modules/builder.js +5 -5
  21. package/dist/modules/capabilities.d.ts +68 -0
  22. package/dist/modules/capabilities.d.ts.map +1 -0
  23. package/dist/modules/capabilities.js +113 -0
  24. package/dist/modules/deployments.d.ts +110 -0
  25. package/dist/modules/deployments.d.ts.map +1 -0
  26. package/dist/modules/deployments.js +230 -0
  27. package/dist/modules/flows.d.ts +104 -0
  28. package/dist/modules/flows.d.ts.map +1 -0
  29. package/dist/modules/flows.js +190 -0
  30. package/dist/modules/handoff.d.ts +88 -0
  31. package/dist/modules/handoff.d.ts.map +1 -0
  32. package/dist/modules/handoff.js +128 -0
  33. package/dist/modules/incidents.d.ts +133 -0
  34. package/dist/modules/incidents.d.ts.map +1 -0
  35. package/dist/modules/incidents.js +231 -0
  36. package/dist/modules/members.d.ts +5 -0
  37. package/dist/modules/members.d.ts.map +1 -1
  38. package/dist/modules/members.js +10 -0
  39. package/dist/modules/policies.d.ts +103 -0
  40. package/dist/modules/policies.d.ts.map +1 -0
  41. package/dist/modules/policies.js +180 -0
  42. package/dist/modules/runs.d.ts.map +1 -1
  43. package/dist/modules/tenants.d.ts +4 -0
  44. package/dist/modules/tenants.d.ts.map +1 -1
  45. package/dist/modules/tenants.js +8 -0
  46. package/package.json +49 -48
  47. package/src/client/AgentOsClient.ts +45 -7
  48. package/src/generated/openapi.ts +93 -0
  49. package/src/generated/swagger.json +107 -0
  50. package/src/index.ts +11 -0
  51. package/src/modules/approvals.ts +210 -0
  52. package/src/modules/artifacts.ts +287 -0
  53. package/src/modules/budgets.ts +236 -0
  54. package/src/modules/builder.ts +3 -3
  55. package/src/modules/capabilities.ts +176 -0
  56. package/src/modules/deployments.ts +315 -0
  57. package/src/modules/flows.ts +259 -0
  58. package/src/modules/handoff.ts +204 -0
  59. package/src/modules/incidents.ts +339 -0
  60. package/src/modules/members.ts +11 -0
  61. package/src/modules/policies.ts +258 -0
  62. package/src/modules/tenants.ts +9 -0
package/dist/index.d.ts CHANGED
@@ -67,6 +67,15 @@ export { MeModule, type MeResponse } from "./modules/me.js";
67
67
  export { InfoModule, type ServerInfo } from "./modules/info.js";
68
68
  export { MetricsModule, type MetricsResponse } from "./modules/metrics.js";
69
69
  export { GraphsModule, type GraphValidationResult, type GraphIntrospectionResult } from "./modules/graphs.js";
70
+ export { HandoffModule, type HandoffOptions, type HandoffResult, type ForkOptions, type ForkResult, type RunChain, type RunChainNode, type HandoffMode, type HandoffConstraints } from "./modules/handoff.js";
71
+ export { FlowsModule, type Flow, type FlowStep, type FlowRun, type FlowVisualization, type FlowSimulationResult, type FlowStatus, type FlowListResponse } from "./modules/flows.js";
72
+ export { CapabilitiesModule, type Capability, type CapabilityConfig, type CapabilitySet, type CapabilityOverride } from "./modules/capabilities.js";
73
+ export { PoliciesModule, type Policy, type PolicyType, type PolicyScope, type PolicyCondition, type PolicyAction, type PolicyEvaluationInput, type PolicyEvaluationResult, type PolicyListResponse } from "./modules/policies.js";
74
+ export { ApprovalsModule, type Approval, type ApprovalStatus, type ApprovalRequest, type ApprovalListResponse } from "./modules/approvals.js";
75
+ export { BudgetsModule, type Budget, type BudgetPeriod, type BudgetScope, type BudgetUsage, type BudgetBreakdown, type CostEstimate, type BudgetListResponse } from "./modules/budgets.js";
76
+ export { DeploymentsModule, type Environment, type EnvironmentType, type Deployment, type DeploymentStatus, type DeploymentDiff, type EnvironmentListResponse, type DeploymentListResponse } from "./modules/deployments.js";
77
+ export { IncidentsModule, type Incident, type IncidentSeverity, type IncidentStatus, type SLO, type Postmortem, type PostmortemEvent, type ActionItem, type IncidentListResponse, type SLOListResponse } from "./modules/incidents.js";
78
+ export { ArtifactsModule, type Artifact, type ArtifactType, type ArtifactLineage, type LineageSource, type LineageTransformation, type ArtifactListResponse } from "./modules/artifacts.js";
70
79
  export { streamSSE, type SSEEvent, type SSEOptions, type RunStreamEvent } from "./sse/client.js";
71
80
  export type { Agent as AgentSchema, CreateAgentRequest, UpdateAgentRequest, AgentBundle, CreateAgentVersionRequest, RunResponse, RunDetailResponse, WaitRunResponse, BatchRunResponse, CancelRunResponse, ReplayRequest, ThreadRequest, ThreadSearchRequest, AddMessageRequest, CheckpointDetail, CheckpointListResponse, CreateCredentialRequest, UpdateCredentialRequest, CreateCronJobRequest, UpdateCronJobRequest, InviteMemberRequest, UpdateMemberRequest, CreatePromptRequest, CreatePromptVersionRequest, CreatePresignedUploadRequest, PresignedUploadResponse, VectorStoreResponse, VectorQueryRequest, VectorQueryResponse, CreateDatasetRequest, CreateExperimentRequest, ProblemDetails, } from "./client/raw.js";
72
81
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAKH,OAAO,EAAE,aAAa,EAAE,KAAK,oBAAoB,EAAE,MAAM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AAE,MAAM,wBAAwB,CAAC;AACvO,OAAO,EAAE,eAAe,EAAE,KAAK,QAAQ,EAAE,KAAK,YAAY,EAAE,KAAK,eAAe,EAAE,KAAK,aAAa,EAAE,KAAK,qBAAqB,EAAE,KAAK,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAK5L,OAAO,EAAE,SAAS,EAAE,KAAK,QAAQ,EAAE,KAAK,UAAU,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAKjG,YAAY,EAER,KAAK,IAAI,WAAW,EACpB,kBAAkB,EAClB,kBAAkB,EAClB,WAAW,EACX,yBAAyB,EAEzB,WAAW,EACX,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,EAEb,aAAa,EACb,mBAAmB,EACnB,iBAAiB,EAEjB,gBAAgB,EAChB,sBAAsB,EAEtB,uBAAuB,EACvB,uBAAuB,EAEvB,oBAAoB,EACpB,oBAAoB,EAEpB,mBAAmB,EACnB,mBAAmB,EAEnB,mBAAmB,EACnB,0BAA0B,EAE1B,4BAA4B,EAC5B,uBAAuB,EAEvB,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EAEnB,oBAAoB,EACpB,uBAAuB,EAEvB,cAAc,GACjB,MAAM,iBAAiB,CAAC"}
package/dist/index.js CHANGED
@@ -80,6 +80,16 @@ export { MeModule } from "./modules/me.js";
80
80
  export { InfoModule } from "./modules/info.js";
81
81
  export { MetricsModule } from "./modules/metrics.js";
82
82
  export { GraphsModule } from "./modules/graphs.js";
83
+ // MOCK - Future modules (marked for replacement when backend is ready)
84
+ export { HandoffModule } from "./modules/handoff.js";
85
+ export { FlowsModule } from "./modules/flows.js";
86
+ export { CapabilitiesModule } from "./modules/capabilities.js";
87
+ export { PoliciesModule } from "./modules/policies.js";
88
+ export { ApprovalsModule } from "./modules/approvals.js";
89
+ export { BudgetsModule } from "./modules/budgets.js";
90
+ export { DeploymentsModule } from "./modules/deployments.js";
91
+ export { IncidentsModule } from "./modules/incidents.js";
92
+ export { ArtifactsModule } from "./modules/artifacts.js";
83
93
  // ============================================================================
84
94
  // SSE Streaming
85
95
  // ============================================================================
@@ -0,0 +1,78 @@
1
+ /**
2
+ * Approvals Module - Human-in-the-Loop Native
3
+ *
4
+ * // MOCK - This module contains mock implementations for future features
5
+ *
6
+ * Provides native support for approval workflows.
7
+ * Critical for production deployments with dangerous actions.
8
+ */
9
+ import type { RawClient, APIResponse } from "../client/raw.js";
10
+ export type ApprovalStatus = "pending" | "approved" | "rejected" | "expired" | "auto_approved";
11
+ export interface Approval {
12
+ id: string;
13
+ run_id: string;
14
+ thread_id?: string;
15
+ action: string;
16
+ payload: Record<string, unknown>;
17
+ status: ApprovalStatus;
18
+ reason?: string;
19
+ requested_at: string;
20
+ responded_at?: string;
21
+ responded_by?: string;
22
+ expires_at?: string;
23
+ auto_approve_after?: number;
24
+ }
25
+ export interface ApprovalRequest {
26
+ run_id: string;
27
+ action: string;
28
+ payload: Record<string, unknown>;
29
+ expires_in_seconds?: number;
30
+ auto_approve_after_seconds?: number;
31
+ notify_channels?: string[];
32
+ }
33
+ export interface ApprovalListResponse {
34
+ items: Approval[];
35
+ total: number;
36
+ pending_count: number;
37
+ }
38
+ export interface ApprovalDecision {
39
+ approval_id: string;
40
+ decision: "approve" | "reject";
41
+ reason?: string;
42
+ modified_payload?: Record<string, unknown>;
43
+ }
44
+ export declare class ApprovalsModule {
45
+ private client;
46
+ private headers;
47
+ constructor(client: RawClient, headers: () => Record<string, string>);
48
+ /**
49
+ * List all approvals.
50
+ */
51
+ list(params?: {
52
+ status?: ApprovalStatus;
53
+ run_id?: string;
54
+ limit?: number;
55
+ offset?: number;
56
+ }): Promise<APIResponse<ApprovalListResponse>>;
57
+ /**
58
+ * Get an approval by ID.
59
+ */
60
+ get(approvalId: string): Promise<APIResponse<Approval>>;
61
+ /**
62
+ * Create a new approval request.
63
+ */
64
+ create(request: ApprovalRequest): Promise<APIResponse<Approval>>;
65
+ /**
66
+ * Approve an action.
67
+ */
68
+ approve(approvalId: string, reason?: string): Promise<APIResponse<Approval>>;
69
+ /**
70
+ * Reject an action.
71
+ */
72
+ reject(approvalId: string, reason?: string): Promise<APIResponse<Approval>>;
73
+ /**
74
+ * Wait for approval on a run (blocks until resolved or timeout).
75
+ */
76
+ awaitApproval(runId: string, timeoutSeconds?: number): Promise<APIResponse<Approval>>;
77
+ }
78
+ //# sourceMappingURL=approvals.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"approvals.d.ts","sourceRoot":"","sources":["../../src/modules/approvals.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAM/D,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,GAAG,SAAS,GAAG,eAAe,CAAC;AAE/F,MAAM,WAAW,QAAQ;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,MAAM,EAAE,cAAc,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,MAAM,WAAW,eAAe;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,0BAA0B,CAAC,EAAE,MAAM,CAAC;IAC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QAAQ,CAAC,CAAC;IAiBjF;;OAEG;IACG,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;CAe9F"}
@@ -0,0 +1,157 @@
1
+ /**
2
+ * Approvals Module - Human-in-the-Loop Native
3
+ *
4
+ * // MOCK - This module contains mock implementations for future features
5
+ *
6
+ * Provides native support for approval workflows.
7
+ * Critical for production deployments with dangerous actions.
8
+ */
9
+ // ============================================================================
10
+ // Module
11
+ // ============================================================================
12
+ export class ApprovalsModule {
13
+ client;
14
+ headers;
15
+ constructor(client, headers) {
16
+ this.client = client;
17
+ this.headers = headers;
18
+ }
19
+ // MOCK - Simulated list
20
+ /**
21
+ * List all approvals.
22
+ */
23
+ async list(params) {
24
+ // MOCK - Returns simulated data
25
+ const mockApprovals = {
26
+ items: [
27
+ {
28
+ id: "approval_1",
29
+ run_id: "run_123",
30
+ thread_id: "thread_456",
31
+ action: "send_email",
32
+ payload: {
33
+ to: "external@gmail.com",
34
+ subject: "Important Update",
35
+ body: "Hello, this is an important message...",
36
+ },
37
+ status: "pending",
38
+ requested_at: new Date(Date.now() - 300000).toISOString(),
39
+ expires_at: new Date(Date.now() + 3600000).toISOString(),
40
+ },
41
+ {
42
+ id: "approval_2",
43
+ run_id: "run_124",
44
+ action: "execute_payment",
45
+ payload: {
46
+ amount: 1500.00,
47
+ currency: "USD",
48
+ recipient: "vendor@company.com",
49
+ },
50
+ status: "pending",
51
+ requested_at: new Date(Date.now() - 600000).toISOString(),
52
+ expires_at: new Date(Date.now() + 7200000).toISOString(),
53
+ },
54
+ ],
55
+ total: 2,
56
+ pending_count: 2,
57
+ };
58
+ return { data: mockApprovals, error: undefined, response: new Response() };
59
+ }
60
+ // MOCK - Simulated get
61
+ /**
62
+ * Get an approval by ID.
63
+ */
64
+ async get(approvalId) {
65
+ // MOCK - Returns simulated data
66
+ const mockApproval = {
67
+ id: approvalId,
68
+ run_id: "run_123",
69
+ action: "send_email",
70
+ payload: {
71
+ to: "external@gmail.com",
72
+ subject: "Important Update",
73
+ },
74
+ status: "pending",
75
+ requested_at: new Date(Date.now() - 300000).toISOString(),
76
+ expires_at: new Date(Date.now() + 3600000).toISOString(),
77
+ };
78
+ return { data: mockApproval, error: undefined, response: new Response() };
79
+ }
80
+ // MOCK - Simulated create
81
+ /**
82
+ * Create a new approval request.
83
+ */
84
+ async create(request) {
85
+ // MOCK - Returns simulated data
86
+ const mockApproval = {
87
+ id: `approval_${Date.now()}`,
88
+ run_id: request.run_id,
89
+ action: request.action,
90
+ payload: request.payload,
91
+ status: "pending",
92
+ requested_at: new Date().toISOString(),
93
+ expires_at: request.expires_in_seconds
94
+ ? new Date(Date.now() + request.expires_in_seconds * 1000).toISOString()
95
+ : undefined,
96
+ auto_approve_after: request.auto_approve_after_seconds,
97
+ };
98
+ return { data: mockApproval, error: undefined, response: new Response() };
99
+ }
100
+ // MOCK - Simulated approve
101
+ /**
102
+ * Approve an action.
103
+ */
104
+ async approve(approvalId, reason) {
105
+ // MOCK - Returns simulated data
106
+ const mockApproval = {
107
+ id: approvalId,
108
+ run_id: "run_123",
109
+ action: "send_email",
110
+ payload: {},
111
+ status: "approved",
112
+ reason,
113
+ requested_at: new Date(Date.now() - 300000).toISOString(),
114
+ responded_at: new Date().toISOString(),
115
+ responded_by: "user_admin",
116
+ };
117
+ return { data: mockApproval, error: undefined, response: new Response() };
118
+ }
119
+ // MOCK - Simulated reject
120
+ /**
121
+ * Reject an action.
122
+ */
123
+ async reject(approvalId, reason) {
124
+ // MOCK - Returns simulated data
125
+ const mockApproval = {
126
+ id: approvalId,
127
+ run_id: "run_123",
128
+ action: "send_email",
129
+ payload: {},
130
+ status: "rejected",
131
+ reason: reason || "Action not permitted",
132
+ requested_at: new Date(Date.now() - 300000).toISOString(),
133
+ responded_at: new Date().toISOString(),
134
+ responded_by: "user_admin",
135
+ };
136
+ return { data: mockApproval, error: undefined, response: new Response() };
137
+ }
138
+ // MOCK - Simulated await
139
+ /**
140
+ * Wait for approval on a run (blocks until resolved or timeout).
141
+ */
142
+ async awaitApproval(runId, timeoutSeconds) {
143
+ // MOCK - Returns simulated pending approval
144
+ const mockApproval = {
145
+ id: `approval_await_${runId}`,
146
+ run_id: runId,
147
+ action: "awaiting_action",
148
+ payload: {},
149
+ status: "pending",
150
+ requested_at: new Date().toISOString(),
151
+ expires_at: timeoutSeconds
152
+ ? new Date(Date.now() + timeoutSeconds * 1000).toISOString()
153
+ : undefined,
154
+ };
155
+ return { data: mockApproval, error: undefined, response: new Response() };
156
+ }
157
+ }
@@ -0,0 +1,100 @@
1
+ /**
2
+ * Artifacts Module - Output Management
3
+ *
4
+ * // MOCK - This module contains mock implementations for future features
5
+ *
6
+ * Manages artifacts as first-class outputs with integrity,
7
+ * lineage tracking, and signatures.
8
+ */
9
+ import type { RawClient, APIResponse } from "../client/raw.js";
10
+ export type ArtifactType = "file" | "image" | "document" | "code" | "data" | "other";
11
+ export interface Artifact {
12
+ id: string;
13
+ name: string;
14
+ type: ArtifactType;
15
+ mime_type: string;
16
+ size_bytes: number;
17
+ sha256: string;
18
+ url?: string;
19
+ run_id?: string;
20
+ thread_id?: string;
21
+ metadata: Record<string, unknown>;
22
+ signed: boolean;
23
+ signature?: string;
24
+ created_at: string;
25
+ created_by: string;
26
+ }
27
+ export interface ArtifactLineage {
28
+ artifact_id: string;
29
+ source: LineageSource;
30
+ transformations: LineageTransformation[];
31
+ dependencies: string[];
32
+ }
33
+ export interface LineageSource {
34
+ type: "run" | "upload" | "tool" | "agent";
35
+ id: string;
36
+ name: string;
37
+ timestamp: string;
38
+ }
39
+ export interface LineageTransformation {
40
+ step: number;
41
+ operation: string;
42
+ run_id?: string;
43
+ tool_name?: string;
44
+ timestamp: string;
45
+ }
46
+ export interface ArtifactListResponse {
47
+ items: Artifact[];
48
+ total: number;
49
+ }
50
+ export declare class ArtifactsModule {
51
+ private client;
52
+ private headers;
53
+ constructor(client: RawClient, headers: () => Record<string, string>);
54
+ /**
55
+ * List all artifacts.
56
+ */
57
+ list(params?: {
58
+ run_id?: string;
59
+ thread_id?: string;
60
+ type?: ArtifactType;
61
+ }): Promise<APIResponse<ArtifactListResponse>>;
62
+ /**
63
+ * Get an artifact by ID.
64
+ */
65
+ get(artifactId: string): Promise<APIResponse<Artifact>>;
66
+ /**
67
+ * Create a new artifact reference.
68
+ */
69
+ create(body: {
70
+ name: string;
71
+ type: ArtifactType;
72
+ mime_type: string;
73
+ size_bytes: number;
74
+ sha256: string;
75
+ run_id?: string;
76
+ thread_id?: string;
77
+ metadata?: Record<string, unknown>;
78
+ }): Promise<APIResponse<Artifact>>;
79
+ /**
80
+ * Delete an artifact.
81
+ */
82
+ delete(artifactId: string): Promise<APIResponse<void>>;
83
+ /**
84
+ * Sign an artifact for integrity verification.
85
+ */
86
+ sign(artifactId: string): Promise<APIResponse<Artifact>>;
87
+ /**
88
+ * Get artifact lineage (provenance tracking).
89
+ */
90
+ lineage(artifactId: string): Promise<APIResponse<ArtifactLineage>>;
91
+ /**
92
+ * Get all artifacts produced by a run.
93
+ */
94
+ getForRun(runId: string): Promise<APIResponse<ArtifactListResponse>>;
95
+ /**
96
+ * Attach an artifact to a thread.
97
+ */
98
+ attachToThread(threadId: string, artifactId: string): Promise<APIResponse<Artifact>>;
99
+ }
100
+ //# sourceMappingURL=artifacts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"artifacts.d.ts","sourceRoot":"","sources":["../../src/modules/artifacts.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAM/D,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,OAAO,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAErF,MAAM,WAAW,QAAQ;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IAC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@
1
+ /**
2
+ * Artifacts Module - Output Management
3
+ *
4
+ * // MOCK - This module contains mock implementations for future features
5
+ *
6
+ * Manages artifacts as first-class outputs with integrity,
7
+ * lineage tracking, and signatures.
8
+ */
9
+ // ============================================================================
10
+ // Module
11
+ // ============================================================================
12
+ export class ArtifactsModule {
13
+ client;
14
+ headers;
15
+ constructor(client, headers) {
16
+ this.client = client;
17
+ this.headers = headers;
18
+ }
19
+ // MOCK - Simulated list
20
+ /**
21
+ * List all artifacts.
22
+ */
23
+ async list(params) {
24
+ // MOCK - Returns simulated data
25
+ const mockArtifacts = {
26
+ items: [
27
+ {
28
+ id: "artifact_1",
29
+ name: "report.pdf",
30
+ type: "document",
31
+ mime_type: "application/pdf",
32
+ size_bytes: 245000,
33
+ sha256: "abc123def456...",
34
+ url: "https://storage.example.com/artifacts/report.pdf",
35
+ run_id: "run_123",
36
+ thread_id: "thread_456",
37
+ metadata: { pages: 12, author: "Agent Support" },
38
+ signed: true,
39
+ signature: "sig_abc123",
40
+ created_at: new Date(Date.now() - 3600000).toISOString(),
41
+ created_by: "agent_support",
42
+ },
43
+ {
44
+ id: "artifact_2",
45
+ name: "analysis.json",
46
+ type: "data",
47
+ mime_type: "application/json",
48
+ size_bytes: 15000,
49
+ sha256: "xyz789ghi012...",
50
+ url: "https://storage.example.com/artifacts/analysis.json",
51
+ run_id: "run_124",
52
+ metadata: { records: 500 },
53
+ signed: false,
54
+ created_at: new Date(Date.now() - 7200000).toISOString(),
55
+ created_by: "agent_analyzer",
56
+ },
57
+ ],
58
+ total: 2,
59
+ };
60
+ return { data: mockArtifacts, error: undefined, response: new Response() };
61
+ }
62
+ // MOCK - Simulated get
63
+ /**
64
+ * Get an artifact by ID.
65
+ */
66
+ async get(artifactId) {
67
+ // MOCK - Returns simulated data
68
+ const mockArtifact = {
69
+ id: artifactId,
70
+ name: "report.pdf",
71
+ type: "document",
72
+ mime_type: "application/pdf",
73
+ size_bytes: 245000,
74
+ sha256: "abc123def456...",
75
+ url: "https://storage.example.com/artifacts/report.pdf",
76
+ run_id: "run_123",
77
+ metadata: { pages: 12 },
78
+ signed: true,
79
+ signature: "sig_abc123",
80
+ created_at: new Date(Date.now() - 3600000).toISOString(),
81
+ created_by: "agent_support",
82
+ };
83
+ return { data: mockArtifact, error: undefined, response: new Response() };
84
+ }
85
+ // MOCK - Simulated create
86
+ /**
87
+ * Create a new artifact reference.
88
+ */
89
+ async create(body) {
90
+ // MOCK - Returns simulated data
91
+ const mockArtifact = {
92
+ id: `artifact_${Date.now()}`,
93
+ name: body.name,
94
+ type: body.type,
95
+ mime_type: body.mime_type,
96
+ size_bytes: body.size_bytes,
97
+ sha256: body.sha256,
98
+ run_id: body.run_id,
99
+ thread_id: body.thread_id,
100
+ metadata: body.metadata || {},
101
+ signed: false,
102
+ created_at: new Date().toISOString(),
103
+ created_by: "user_current",
104
+ };
105
+ return { data: mockArtifact, error: undefined, response: new Response() };
106
+ }
107
+ // MOCK - Simulated delete
108
+ /**
109
+ * Delete an artifact.
110
+ */
111
+ async delete(artifactId) {
112
+ // MOCK - Returns success
113
+ return { data: undefined, error: undefined, response: new Response() };
114
+ }
115
+ // MOCK - Simulated sign
116
+ /**
117
+ * Sign an artifact for integrity verification.
118
+ */
119
+ async sign(artifactId) {
120
+ // MOCK - Returns simulated signed artifact
121
+ const mockArtifact = {
122
+ id: artifactId,
123
+ name: "report.pdf",
124
+ type: "document",
125
+ mime_type: "application/pdf",
126
+ size_bytes: 245000,
127
+ sha256: "abc123def456...",
128
+ metadata: {},
129
+ signed: true,
130
+ signature: `sig_${Date.now()}`,
131
+ created_at: new Date(Date.now() - 3600000).toISOString(),
132
+ created_by: "agent_support",
133
+ };
134
+ return { data: mockArtifact, error: undefined, response: new Response() };
135
+ }
136
+ // MOCK - Simulated lineage
137
+ /**
138
+ * Get artifact lineage (provenance tracking).
139
+ */
140
+ async lineage(artifactId) {
141
+ // MOCK - Returns simulated lineage
142
+ const mockLineage = {
143
+ artifact_id: artifactId,
144
+ source: {
145
+ type: "run",
146
+ id: "run_123",
147
+ name: "Support Agent Run",
148
+ timestamp: new Date(Date.now() - 3600000).toISOString(),
149
+ },
150
+ transformations: [
151
+ {
152
+ step: 1,
153
+ operation: "generate",
154
+ run_id: "run_123",
155
+ tool_name: "document_generator",
156
+ timestamp: new Date(Date.now() - 3500000).toISOString(),
157
+ },
158
+ {
159
+ step: 2,
160
+ operation: "format",
161
+ run_id: "run_123",
162
+ tool_name: "pdf_formatter",
163
+ timestamp: new Date(Date.now() - 3400000).toISOString(),
164
+ },
165
+ ],
166
+ dependencies: ["artifact_raw_data", "artifact_template"],
167
+ };
168
+ return { data: mockLineage, error: undefined, response: new Response() };
169
+ }
170
+ // MOCK - Simulated getForRun
171
+ /**
172
+ * Get all artifacts produced by a run.
173
+ */
174
+ async getForRun(runId) {
175
+ // MOCK - Returns simulated data
176
+ const mockArtifacts = {
177
+ items: [
178
+ {
179
+ id: "artifact_run_1",
180
+ name: "output.json",
181
+ type: "data",
182
+ mime_type: "application/json",
183
+ size_bytes: 5000,
184
+ sha256: "run_output_hash",
185
+ run_id: runId,
186
+ metadata: {},
187
+ signed: false,
188
+ created_at: new Date().toISOString(),
189
+ created_by: "agent",
190
+ },
191
+ ],
192
+ total: 1,
193
+ };
194
+ return { data: mockArtifacts, error: undefined, response: new Response() };
195
+ }
196
+ // MOCK - Simulated attachToThread
197
+ /**
198
+ * Attach an artifact to a thread.
199
+ */
200
+ async attachToThread(threadId, artifactId) {
201
+ // MOCK - Returns simulated data
202
+ const mockArtifact = {
203
+ id: artifactId,
204
+ name: "attached_file.pdf",
205
+ type: "document",
206
+ mime_type: "application/pdf",
207
+ size_bytes: 100000,
208
+ sha256: "attached_hash",
209
+ thread_id: threadId,
210
+ metadata: {},
211
+ signed: false,
212
+ created_at: new Date().toISOString(),
213
+ created_by: "user",
214
+ };
215
+ return { data: mockArtifact, error: undefined, response: new Response() };
216
+ }
217
+ }