@agent-os-sdk/client 0.1.2 → 0.2.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.
- package/dist/client/AgentOsClient.d.ts +39 -44
- package/dist/client/AgentOsClient.d.ts.map +1 -1
- package/dist/client/AgentOsClient.js +162 -44
- package/dist/client/auth.d.ts +102 -0
- package/dist/client/auth.d.ts.map +1 -0
- package/dist/client/auth.js +44 -0
- package/dist/generated/openapi.d.ts +914 -202
- package/dist/generated/openapi.d.ts.map +1 -1
- package/dist/index.d.ts +10 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/modules/approvals.d.ts +8 -22
- package/dist/modules/approvals.d.ts.map +1 -1
- package/dist/modules/approvals.js +27 -130
- package/dist/modules/artifacts.d.ts +28 -79
- package/dist/modules/artifacts.d.ts.map +1 -1
- package/dist/modules/artifacts.js +30 -197
- package/dist/modules/budgets.d.ts +47 -70
- package/dist/modules/budgets.d.ts.map +1 -1
- package/dist/modules/budgets.js +28 -139
- package/dist/modules/builder.d.ts +21 -1
- package/dist/modules/builder.d.ts.map +1 -1
- package/dist/modules/builder.js +25 -3
- package/dist/modules/capabilities.d.ts +39 -50
- package/dist/modules/capabilities.d.ts.map +1 -1
- package/dist/modules/capabilities.js +32 -95
- package/dist/modules/deployments.d.ts +49 -92
- package/dist/modules/deployments.d.ts.map +1 -1
- package/dist/modules/deployments.js +37 -209
- package/dist/modules/flows.d.ts +11 -31
- package/dist/modules/flows.d.ts.map +1 -1
- package/dist/modules/flows.js +33 -157
- package/dist/modules/handoff.d.ts +7 -4
- package/dist/modules/handoff.d.ts.map +1 -1
- package/dist/modules/handoff.js +25 -88
- package/dist/modules/incidents.d.ts +40 -101
- package/dist/modules/incidents.d.ts.map +1 -1
- package/dist/modules/incidents.js +31 -208
- package/dist/modules/policies.d.ts +42 -69
- package/dist/modules/policies.d.ts.map +1 -1
- package/dist/modules/policies.js +25 -159
- package/dist/modules/runs.d.ts +89 -3
- package/dist/modules/runs.d.ts.map +1 -1
- package/dist/modules/runs.js +75 -4
- package/package.json +1 -1
- package/src/client/AgentOsClient.ts +185 -67
- package/src/client/auth.ts +148 -0
- package/src/generated/openapi.ts +914 -202
- package/src/generated/swagger.json +770 -630
- package/src/index.ts +22 -10
- package/src/modules/approvals.ts +31 -132
- package/src/modules/artifacts.ts +41 -245
- package/src/modules/budgets.ts +65 -181
- package/src/modules/builder.ts +25 -3
- package/src/modules/capabilities.ts +58 -139
- package/src/modules/deployments.ts +67 -271
- package/src/modules/flows.ts +37 -163
- package/src/modules/handoff.ts +29 -93
- package/src/modules/incidents.ts +56 -282
- package/src/modules/policies.ts +57 -203
- package/src/modules/runs.ts +123 -5
package/dist/index.d.ts
CHANGED
|
@@ -34,12 +34,13 @@
|
|
|
34
34
|
* }
|
|
35
35
|
* ```
|
|
36
36
|
*/
|
|
37
|
-
export { AgentOsClient, type AgentOsClientOptions } from "./client/AgentOsClient.js";
|
|
37
|
+
export { AgentOsClient, type AgentOsClientOptions, type AgentOsClientOptionsLegacy, type AuthProvider } from "./client/AgentOsClient.js";
|
|
38
|
+
export { type ApiTokenAuth, type JwtAuth, isApiTokenAuth, isJwtAuth, isNewAuthOptions, isBrowser, isApiToken, isJwtToken, } from "./client/auth.js";
|
|
38
39
|
export { unwrap, toResult, SDKError, type PaginationParams, type PaginatedResponse, type Result, type Unwrapped, } from "./client/helpers.js";
|
|
39
40
|
export { createRawClient, createTypedClient, type RawClient, type TypedClient, type ClientOptions, type APIResponse, } from "./client/raw.js";
|
|
40
41
|
export type { paths, components } from "./client/raw.js";
|
|
41
42
|
export { AgentsModule, type Agent, type AgentVersion, type AgentListResponse, type AgentGraphResponse } from "./modules/agents.js";
|
|
42
|
-
export { RunsModule, type Run, type RunEvent, type RunListResponse, type RunEventsResponse, type CreateRunResponse } from "./modules/runs.js";
|
|
43
|
+
export { RunsModule, type Run, type RunStatus, type RunEvent, type RunListResponse, type RunEventsResponse, type CreateRunResponse, type RunEventsPollResponse, type RunEventDto } from "./modules/runs.js";
|
|
43
44
|
export { ThreadsModule, type Thread, type ThreadState, type ThreadMessage, type ThreadRun, type ThreadListResponse, type ThreadMessagesResponse } from "./modules/threads.js";
|
|
44
45
|
export { ToolsModule, type Tool, type ToolListResponse } from "./modules/tools.js";
|
|
45
46
|
export { KnowledgeModule, type KnowledgeDataset, type KnowledgeSearchResponse } from "./modules/knowledge.js";
|
|
@@ -69,13 +70,13 @@ export { MetricsModule, type MetricsResponse } from "./modules/metrics.js";
|
|
|
69
70
|
export { GraphsModule, type GraphValidationResult, type GraphIntrospectionResult } from "./modules/graphs.js";
|
|
70
71
|
export { HandoffModule, type HandoffOptions, type HandoffResult, type ForkOptions, type ForkResult, type RunChain, type RunChainNode, type HandoffMode, type HandoffConstraints } from "./modules/handoff.js";
|
|
71
72
|
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
|
|
73
|
-
export { PoliciesModule, type Policy, type
|
|
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
|
|
76
|
-
export { DeploymentsModule, type Environment, type
|
|
77
|
-
export { IncidentsModule, type Incident, type IncidentSeverity, type IncidentStatus, type
|
|
78
|
-
export { ArtifactsModule, type Artifact, type ArtifactType, type
|
|
73
|
+
export { CapabilitiesModule, type Capability, type CapabilityType, type CapabilityTest, type CapabilityMatrix } from "./modules/capabilities.js";
|
|
74
|
+
export { PoliciesModule, type Policy, type PolicyScope, type PolicyEnforcement, type PolicyRule, type PolicyEvaluation, type PolicyEvaluationResult } from "./modules/policies.js";
|
|
75
|
+
export { ApprovalsModule, type Approval, type ApprovalStatus, type ApprovalRequest, type ApprovalDecision, type ApprovalListResponse } from "./modules/approvals.js";
|
|
76
|
+
export { BudgetsModule, type Budget, type BudgetPeriod, type BudgetScope, type BudgetResourceType, type BudgetUsage, type BudgetAlert, type BudgetBreakdownItem } from "./modules/budgets.js";
|
|
77
|
+
export { DeploymentsModule, type Environment, type Deployment, type DeploymentStatus, type DeploymentConfig, type DeploymentHealth } from "./modules/deployments.js";
|
|
78
|
+
export { IncidentsModule, type Incident, type IncidentSeverity, type IncidentStatus, type IncidentUpdate, type IncidentMetrics } from "./modules/incidents.js";
|
|
79
|
+
export { ArtifactsModule, type Artifact, type ArtifactType, type ArtifactUploadUrl } from "./modules/artifacts.js";
|
|
79
80
|
export { streamSSE, type SSEEvent, type SSEOptions, type RunStreamEvent } from "./sse/client.js";
|
|
80
81
|
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";
|
|
81
82
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -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,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;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KAAK,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAKnH,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
|
@@ -38,6 +38,8 @@
|
|
|
38
38
|
// Main Client
|
|
39
39
|
// ============================================================================
|
|
40
40
|
export { AgentOsClient } from "./client/AgentOsClient.js";
|
|
41
|
+
// Auth Provider Types
|
|
42
|
+
export { isApiTokenAuth, isJwtAuth, isNewAuthOptions, isBrowser, isApiToken, isJwtToken, } from "./client/auth.js";
|
|
41
43
|
// ============================================================================
|
|
42
44
|
// Helpers & Utilities
|
|
43
45
|
// ============================================================================
|
|
@@ -80,7 +82,7 @@ export { MeModule } from "./modules/me.js";
|
|
|
80
82
|
export { InfoModule } from "./modules/info.js";
|
|
81
83
|
export { MetricsModule } from "./modules/metrics.js";
|
|
82
84
|
export { GraphsModule } from "./modules/graphs.js";
|
|
83
|
-
//
|
|
85
|
+
// FUTURE modules - All return 501 Not Implemented. When backend is ready, implement real calls.
|
|
84
86
|
export { HandoffModule } from "./modules/handoff.js";
|
|
85
87
|
export { FlowsModule } from "./modules/flows.js";
|
|
86
88
|
export { CapabilitiesModule } from "./modules/capabilities.js";
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Approvals Module - Human-in-the-Loop Native
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* Provides native support for approval workflows.
|
|
7
|
-
* Critical for production deployments with dangerous actions.
|
|
4
|
+
* NOT IMPLEMENTED - Backend endpoint not available.
|
|
5
|
+
* All methods return 501 NotImplemented.
|
|
8
6
|
*/
|
|
9
7
|
import type { RawClient, APIResponse } from "../client/raw.js";
|
|
10
8
|
export type ApprovalStatus = "pending" | "approved" | "rejected" | "expired" | "auto_approved";
|
|
@@ -45,34 +43,22 @@ export declare class ApprovalsModule {
|
|
|
45
43
|
private client;
|
|
46
44
|
private headers;
|
|
47
45
|
constructor(client: RawClient, headers: () => Record<string, string>);
|
|
48
|
-
/**
|
|
49
|
-
* List all approvals.
|
|
50
|
-
*/
|
|
46
|
+
/** @returns 501 Not Implemented */
|
|
51
47
|
list(params?: {
|
|
52
48
|
status?: ApprovalStatus;
|
|
53
49
|
run_id?: string;
|
|
54
50
|
limit?: number;
|
|
55
51
|
offset?: number;
|
|
56
52
|
}): Promise<APIResponse<ApprovalListResponse>>;
|
|
57
|
-
/**
|
|
58
|
-
* Get an approval by ID.
|
|
59
|
-
*/
|
|
53
|
+
/** @returns 501 Not Implemented */
|
|
60
54
|
get(approvalId: string): Promise<APIResponse<Approval>>;
|
|
61
|
-
/**
|
|
62
|
-
* Create a new approval request.
|
|
63
|
-
*/
|
|
55
|
+
/** @returns 501 Not Implemented */
|
|
64
56
|
create(request: ApprovalRequest): Promise<APIResponse<Approval>>;
|
|
65
|
-
/**
|
|
66
|
-
* Approve an action.
|
|
67
|
-
*/
|
|
57
|
+
/** @returns 501 Not Implemented */
|
|
68
58
|
approve(approvalId: string, reason?: string): Promise<APIResponse<Approval>>;
|
|
69
|
-
/**
|
|
70
|
-
* Reject an action.
|
|
71
|
-
*/
|
|
59
|
+
/** @returns 501 Not Implemented */
|
|
72
60
|
reject(approvalId: string, reason?: string): Promise<APIResponse<Approval>>;
|
|
73
|
-
/**
|
|
74
|
-
* Wait for approval on a run (blocks until resolved or timeout).
|
|
75
|
-
*/
|
|
61
|
+
/** @returns 501 Not Implemented */
|
|
76
62
|
awaitApproval(runId: string, timeoutSeconds?: number): Promise<APIResponse<Approval>>;
|
|
77
63
|
}
|
|
78
64
|
//# sourceMappingURL=approvals.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"approvals.d.ts","sourceRoot":"","sources":["../../src/modules/approvals.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"approvals.d.ts","sourceRoot":"","sources":["../../src/modules/approvals.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;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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AM,GAAG,OAAO,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;IAIlF,mCAAmC;IAC7B,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;IAIjF,mCAAmC;IAC7B,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;CAG9F"}
|
|
@@ -1,12 +1,23 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Approvals Module - Human-in-the-Loop Native
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* Provides native support for approval workflows.
|
|
7
|
-
* Critical for production deployments with dangerous actions.
|
|
4
|
+
* NOT IMPLEMENTED - Backend endpoint not available.
|
|
5
|
+
* All methods return 501 NotImplemented.
|
|
8
6
|
*/
|
|
9
7
|
// ============================================================================
|
|
8
|
+
// Helper for 501 responses
|
|
9
|
+
// ============================================================================
|
|
10
|
+
function notImplemented(method) {
|
|
11
|
+
return {
|
|
12
|
+
data: undefined,
|
|
13
|
+
error: {
|
|
14
|
+
code: "NOT_IMPLEMENTED",
|
|
15
|
+
message: `ApprovalsModule.${method}() is not implemented. Backend endpoint not available.`,
|
|
16
|
+
},
|
|
17
|
+
response: new Response(null, { status: 501, statusText: "Not Implemented" }),
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
// ============================================================================
|
|
10
21
|
// Module
|
|
11
22
|
// ============================================================================
|
|
12
23
|
export class ApprovalsModule {
|
|
@@ -16,142 +27,28 @@ export class ApprovalsModule {
|
|
|
16
27
|
this.client = client;
|
|
17
28
|
this.headers = headers;
|
|
18
29
|
}
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* List all approvals.
|
|
22
|
-
*/
|
|
30
|
+
/** @returns 501 Not Implemented */
|
|
23
31
|
async list(params) {
|
|
24
|
-
|
|
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() };
|
|
32
|
+
return notImplemented("list");
|
|
59
33
|
}
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Get an approval by ID.
|
|
63
|
-
*/
|
|
34
|
+
/** @returns 501 Not Implemented */
|
|
64
35
|
async get(approvalId) {
|
|
65
|
-
|
|
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() };
|
|
36
|
+
return notImplemented("get");
|
|
79
37
|
}
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* Create a new approval request.
|
|
83
|
-
*/
|
|
38
|
+
/** @returns 501 Not Implemented */
|
|
84
39
|
async create(request) {
|
|
85
|
-
|
|
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() };
|
|
40
|
+
return notImplemented("create");
|
|
99
41
|
}
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* Approve an action.
|
|
103
|
-
*/
|
|
42
|
+
/** @returns 501 Not Implemented */
|
|
104
43
|
async approve(approvalId, reason) {
|
|
105
|
-
|
|
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() };
|
|
44
|
+
return notImplemented("approve");
|
|
118
45
|
}
|
|
119
|
-
|
|
120
|
-
/**
|
|
121
|
-
* Reject an action.
|
|
122
|
-
*/
|
|
46
|
+
/** @returns 501 Not Implemented */
|
|
123
47
|
async reject(approvalId, reason) {
|
|
124
|
-
|
|
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() };
|
|
48
|
+
return notImplemented("reject");
|
|
137
49
|
}
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* Wait for approval on a run (blocks until resolved or timeout).
|
|
141
|
-
*/
|
|
50
|
+
/** @returns 501 Not Implemented */
|
|
142
51
|
async awaitApproval(runId, timeoutSeconds) {
|
|
143
|
-
|
|
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() };
|
|
52
|
+
return notImplemented("awaitApproval");
|
|
156
53
|
}
|
|
157
54
|
}
|
|
@@ -1,100 +1,49 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Artifacts Module - Output Management
|
|
2
|
+
* Artifacts Module - Run Output Management
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* Manages artifacts as first-class outputs with integrity,
|
|
7
|
-
* lineage tracking, and signatures.
|
|
4
|
+
* NOT IMPLEMENTED - Backend endpoint not available.
|
|
5
|
+
* All methods return 501 NotImplemented.
|
|
8
6
|
*/
|
|
9
7
|
import type { RawClient, APIResponse } from "../client/raw.js";
|
|
10
|
-
export type ArtifactType = "file" | "image" | "
|
|
8
|
+
export type ArtifactType = "file" | "image" | "json" | "text" | "log" | "report";
|
|
11
9
|
export interface Artifact {
|
|
12
10
|
id: string;
|
|
11
|
+
run_id: string;
|
|
13
12
|
name: string;
|
|
14
13
|
type: ArtifactType;
|
|
15
|
-
mime_type
|
|
14
|
+
mime_type?: string;
|
|
16
15
|
size_bytes: number;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
metadata: Record<string, unknown>;
|
|
22
|
-
signed: boolean;
|
|
23
|
-
signature?: string;
|
|
16
|
+
checksum?: string;
|
|
17
|
+
download_url?: string;
|
|
18
|
+
preview_url?: string;
|
|
19
|
+
metadata?: Record<string, unknown>;
|
|
24
20
|
created_at: string;
|
|
25
|
-
|
|
21
|
+
expires_at?: string;
|
|
26
22
|
}
|
|
27
|
-
export interface
|
|
23
|
+
export interface ArtifactUploadUrl {
|
|
24
|
+
upload_url: string;
|
|
28
25
|
artifact_id: string;
|
|
29
|
-
|
|
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;
|
|
26
|
+
expires_at: string;
|
|
49
27
|
}
|
|
50
28
|
export declare class ArtifactsModule {
|
|
51
29
|
private client;
|
|
52
30
|
private headers;
|
|
53
31
|
constructor(client: RawClient, headers: () => Record<string, string>);
|
|
54
|
-
/**
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
type?: ArtifactType;
|
|
61
|
-
}): Promise<APIResponse<ArtifactListResponse>>;
|
|
62
|
-
/**
|
|
63
|
-
* Get an artifact by ID.
|
|
64
|
-
*/
|
|
32
|
+
/** @returns 501 Not Implemented */
|
|
33
|
+
list(runId: string): Promise<APIResponse<{
|
|
34
|
+
items: Artifact[];
|
|
35
|
+
total: number;
|
|
36
|
+
}>>;
|
|
37
|
+
/** @returns 501 Not Implemented */
|
|
65
38
|
get(artifactId: string): Promise<APIResponse<Artifact>>;
|
|
66
|
-
/**
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
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
|
-
*/
|
|
39
|
+
/** @returns 501 Not Implemented */
|
|
40
|
+
getDownloadUrl(artifactId: string): Promise<APIResponse<{
|
|
41
|
+
url: string;
|
|
42
|
+
expires_at: string;
|
|
43
|
+
}>>;
|
|
44
|
+
/** @returns 501 Not Implemented */
|
|
45
|
+
createUploadUrl(runId: string, name: string, type: ArtifactType): Promise<APIResponse<ArtifactUploadUrl>>;
|
|
46
|
+
/** @returns 501 Not Implemented */
|
|
82
47
|
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
48
|
}
|
|
100
49
|
//# sourceMappingURL=artifacts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"artifacts.d.ts","sourceRoot":"","sources":["../../src/modules/artifacts.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"artifacts.d.ts","sourceRoot":"","sources":["../../src/modules/artifacts.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAM/D,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,CAAC;AAEjF,MAAM,WAAW,QAAQ;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,YAAY,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,iBAAiB;IAC9B,UAAU,EAAE,MAAM,CAAC;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