@agent-os-sdk/client 0.3.3 → 0.3.5

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.
@@ -1,133 +0,0 @@
1
- /**
2
- * Flows Module - Workflow Orchestration
3
- *
4
- * NOT IMPLEMENTED - Backend endpoint not available.
5
- * All methods return 501 NotImplemented.
6
- */
7
-
8
- import type { RawClient, APIResponse } from "../client/raw.js";
9
-
10
- // ============================================================================
11
- // Types
12
- // ============================================================================
13
-
14
- export type FlowStatus = "draft" | "active" | "paused" | "completed" | "failed" | "cancelled";
15
-
16
- export interface FlowStep {
17
- id: string;
18
- name: string;
19
- agent_id: string;
20
- type: "agent" | "condition" | "parallel" | "wait" | "human_approval";
21
- config?: Record<string, unknown>;
22
- next_steps?: string[];
23
- on_error?: string;
24
- }
25
-
26
- export interface Flow {
27
- id: string;
28
- name: string;
29
- description?: string;
30
- steps: FlowStep[];
31
- status: FlowStatus;
32
- version: number;
33
- created_at: string;
34
- updated_at: string;
35
- }
36
-
37
- export interface FlowRun {
38
- id: string;
39
- flow_id: string;
40
- status: FlowStatus;
41
- current_step_id?: string;
42
- completed_steps: string[];
43
- failed_steps: string[];
44
- context: Record<string, unknown>;
45
- started_at: string;
46
- completed_at?: string;
47
- }
48
-
49
- export interface FlowVisualization {
50
- mermaid: string;
51
- svg?: string;
52
- }
53
-
54
- export interface FlowSimulationResult {
55
- success: boolean;
56
- steps_executed: string[];
57
- estimated_duration_seconds: number;
58
- estimated_cost: number;
59
- potential_issues: string[];
60
- }
61
-
62
- export interface FlowListResponse {
63
- items: Flow[];
64
- total: number;
65
- }
66
-
67
- // ============================================================================
68
- // Helper for 501 responses
69
- // ============================================================================
70
-
71
- function notImplemented<T>(method: string): APIResponse<T> {
72
- return {
73
- data: undefined,
74
- error: {
75
- code: "NOT_IMPLEMENTED",
76
- message: `FlowsModule.${method}() is not implemented. Backend endpoint not available.`,
77
- },
78
- response: new Response(null, { status: 501, statusText: "Not Implemented" }),
79
- };
80
- }
81
-
82
- // ============================================================================
83
- // Module
84
- // ============================================================================
85
-
86
- export class FlowsModule {
87
- constructor(private client: RawClient, private headers: () => Record<string, string>) { }
88
-
89
- /** @returns 501 Not Implemented */
90
- async list(params?: { limit?: number; offset?: number }): Promise<APIResponse<FlowListResponse>> {
91
- return notImplemented<FlowListResponse>("list");
92
- }
93
-
94
- /** @returns 501 Not Implemented */
95
- async get(flowId: string): Promise<APIResponse<Flow>> {
96
- return notImplemented<Flow>("get");
97
- }
98
-
99
- /** @returns 501 Not Implemented */
100
- async create(body: { name: string; description?: string; steps: FlowStep[] }): Promise<APIResponse<Flow>> {
101
- return notImplemented<Flow>("create");
102
- }
103
-
104
- /** @returns 501 Not Implemented */
105
- async run(flowId: string, input?: Record<string, unknown>): Promise<APIResponse<FlowRun>> {
106
- return notImplemented<FlowRun>("run");
107
- }
108
-
109
- /** @returns 501 Not Implemented */
110
- async pause(flowRunId: string): Promise<APIResponse<FlowRun>> {
111
- return notImplemented<FlowRun>("pause");
112
- }
113
-
114
- /** @returns 501 Not Implemented */
115
- async resume(flowRunId: string): Promise<APIResponse<FlowRun>> {
116
- return notImplemented<FlowRun>("resume");
117
- }
118
-
119
- /** @returns 501 Not Implemented */
120
- async cancel(flowRunId: string): Promise<APIResponse<FlowRun>> {
121
- return notImplemented<FlowRun>("cancel");
122
- }
123
-
124
- /** @returns 501 Not Implemented */
125
- async visualize(flowId: string): Promise<APIResponse<FlowVisualization>> {
126
- return notImplemented<FlowVisualization>("visualize");
127
- }
128
-
129
- /** @returns 501 Not Implemented */
130
- async simulate(flowId: string, input?: Record<string, unknown>): Promise<APIResponse<FlowSimulationResult>> {
131
- return notImplemented<FlowSimulationResult>("simulate");
132
- }
133
- }
@@ -1,140 +0,0 @@
1
- /**
2
- * Handoff Module - Multi-Agent Delegation
3
- *
4
- * NOT IMPLEMENTED - Backend endpoint not available.
5
- * All methods return 501 NotImplemented.
6
- */
7
-
8
- import type { RawClient, APIResponse } from "../client/raw.js";
9
-
10
- // ============================================================================
11
- // Types
12
- // ============================================================================
13
-
14
- export type HandoffMode = "same_thread" | "subthread" | "new_thread";
15
-
16
- export interface HandoffOptions {
17
- mode: HandoffMode;
18
- payload?: Record<string, unknown>;
19
- constraints?: HandoffConstraints;
20
- inherit_budget?: boolean;
21
- inherit_policies?: boolean;
22
- }
23
-
24
- export interface HandoffConstraints {
25
- max_tool_calls?: number;
26
- max_tokens?: number;
27
- tool_allowlist?: string[];
28
- tool_denylist?: string[];
29
- timeout_seconds?: number;
30
- }
31
-
32
- export interface HandoffResult {
33
- run_id: string;
34
- parent_run_id: string;
35
- to_agent_id: string;
36
- mode: HandoffMode;
37
- thread_id: string;
38
- status: "pending" | "running" | "completed" | "failed";
39
- created_at: string;
40
- }
41
-
42
- export interface ForkOptions {
43
- mode?: HandoffMode;
44
- checkpoint_id?: string;
45
- copy_messages?: boolean;
46
- copy_state?: boolean;
47
- }
48
-
49
- export interface ForkResult {
50
- original_thread_id: string;
51
- forked_thread_id: string;
52
- checkpoint_id?: string;
53
- created_at: string;
54
- }
55
-
56
- export interface RunChainNode {
57
- run_id: string;
58
- agent_id: string;
59
- agent_name: string;
60
- status: string;
61
- parent_run_id?: string;
62
- children: RunChainNode[];
63
- depth: number;
64
- started_at: string;
65
- completed_at?: string;
66
- }
67
-
68
- export interface RunChain {
69
- root_run_id: string;
70
- total_runs: number;
71
- max_depth: number;
72
- nodes: RunChainNode[];
73
- }
74
-
75
- // ============================================================================
76
- // Helper for 501 responses
77
- // ============================================================================
78
-
79
- function notImplemented<T>(method: string): APIResponse<T> {
80
- return {
81
- data: undefined,
82
- error: {
83
- code: "NOT_IMPLEMENTED",
84
- message: `HandoffModule.${method}() is not implemented. Backend endpoint not available.`,
85
- },
86
- response: new Response(null, { status: 501, statusText: "Not Implemented" }),
87
- };
88
- }
89
-
90
- // ============================================================================
91
- // Module
92
- // ============================================================================
93
-
94
- export class HandoffModule {
95
- constructor(private client: RawClient, private headers: () => Record<string, string>) { }
96
-
97
- /**
98
- * Hand off current run to another agent.
99
- * @returns 501 Not Implemented - Backend not available
100
- */
101
- async handoff(
102
- runId: string,
103
- toAgentId: string,
104
- options?: HandoffOptions
105
- ): Promise<APIResponse<HandoffResult>> {
106
- return notImplemented<HandoffResult>("handoff");
107
- }
108
-
109
- /**
110
- * Fork a thread into a new conversation branch.
111
- * @returns 501 Not Implemented - Backend not available
112
- */
113
- async fork(threadId: string, options?: ForkOptions): Promise<APIResponse<ForkResult>> {
114
- return notImplemented<ForkResult>("fork");
115
- }
116
-
117
- /**
118
- * Get the full run chain (delegation tree).
119
- * @returns 501 Not Implemented - Backend not available
120
- */
121
- async getChain(runId: string): Promise<APIResponse<RunChain>> {
122
- return notImplemented<RunChain>("getChain");
123
- }
124
-
125
- /**
126
- * Get parent runs in the chain.
127
- * @returns 501 Not Implemented - Backend not available
128
- */
129
- async getParents(runId: string): Promise<APIResponse<RunChainNode[]>> {
130
- return notImplemented<RunChainNode[]>("getParents");
131
- }
132
-
133
- /**
134
- * Get child runs in the chain.
135
- * @returns 501 Not Implemented - Backend not available
136
- */
137
- async getChildren(runId: string): Promise<APIResponse<RunChainNode[]>> {
138
- return notImplemented<RunChainNode[]>("getChildren");
139
- }
140
- }
@@ -1,113 +0,0 @@
1
- /**
2
- * Incidents Module - Error & Alert Management
3
- *
4
- * NOT IMPLEMENTED - Backend endpoint not available.
5
- * All methods return 501 NotImplemented.
6
- */
7
-
8
- import type { RawClient, APIResponse } from "../client/raw.js";
9
-
10
- // ============================================================================
11
- // Types
12
- // ============================================================================
13
-
14
- export type IncidentSeverity = "low" | "medium" | "high" | "critical";
15
- export type IncidentStatus = "open" | "investigating" | "identified" | "monitoring" | "resolved" | "closed";
16
-
17
- export interface Incident {
18
- id: string;
19
- title: string;
20
- description?: string;
21
- severity: IncidentSeverity;
22
- status: IncidentStatus;
23
- agent_id?: string;
24
- run_id?: string;
25
- error_type?: string;
26
- error_message?: string;
27
- stack_trace?: string;
28
- affected_users?: number;
29
- created_at: string;
30
- updated_at: string;
31
- resolved_at?: string;
32
- }
33
-
34
- export interface IncidentUpdate {
35
- id: string;
36
- incident_id: string;
37
- message: string;
38
- status_change?: IncidentStatus;
39
- created_by: string;
40
- created_at: string;
41
- }
42
-
43
- export interface IncidentMetrics {
44
- total_open: number;
45
- by_severity: Record<IncidentSeverity, number>;
46
- mttr_seconds: number;
47
- trend_last_7_days: number[];
48
- }
49
-
50
- // ============================================================================
51
- // Helper for 501 responses
52
- // ============================================================================
53
-
54
- function notImplemented<T>(method: string): APIResponse<T> {
55
- return {
56
- data: undefined,
57
- error: {
58
- code: "NOT_IMPLEMENTED",
59
- message: `IncidentsModule.${method}() is not implemented. Backend endpoint not available.`,
60
- },
61
- response: new Response(null, { status: 501, statusText: "Not Implemented" }),
62
- };
63
- }
64
-
65
- // ============================================================================
66
- // Module
67
- // ============================================================================
68
-
69
- export class IncidentsModule {
70
- constructor(private client: RawClient, private headers: () => Record<string, string>) { }
71
-
72
- /** @returns 501 Not Implemented */
73
- async list(params?: {
74
- status?: IncidentStatus;
75
- severity?: IncidentSeverity;
76
- agent_id?: string;
77
- limit?: number;
78
- offset?: number;
79
- }): Promise<APIResponse<{ items: Incident[]; total: number }>> {
80
- return notImplemented<{ items: Incident[]; total: number }>("list");
81
- }
82
-
83
- /** @returns 501 Not Implemented */
84
- async get(incidentId: string): Promise<APIResponse<Incident>> {
85
- return notImplemented<Incident>("get");
86
- }
87
-
88
- /** @returns 501 Not Implemented */
89
- async create(body: {
90
- title: string;
91
- description?: string;
92
- severity: IncidentSeverity;
93
- agent_id?: string;
94
- run_id?: string;
95
- }): Promise<APIResponse<Incident>> {
96
- return notImplemented<Incident>("create");
97
- }
98
-
99
- /** @returns 501 Not Implemented */
100
- async update(incidentId: string, status: IncidentStatus, message?: string): Promise<APIResponse<IncidentUpdate>> {
101
- return notImplemented<IncidentUpdate>("update");
102
- }
103
-
104
- /** @returns 501 Not Implemented */
105
- async resolve(incidentId: string, message?: string): Promise<APIResponse<Incident>> {
106
- return notImplemented<Incident>("resolve");
107
- }
108
-
109
- /** @returns 501 Not Implemented */
110
- async getMetrics(): Promise<APIResponse<IncidentMetrics>> {
111
- return notImplemented<IncidentMetrics>("getMetrics");
112
- }
113
- }
@@ -1,112 +0,0 @@
1
- /**
2
- * Policies Module - Governance & Compliance
3
- *
4
- * NOT IMPLEMENTED - Backend endpoint not available.
5
- * All methods return 501 NotImplemented.
6
- */
7
-
8
- import type { RawClient, APIResponse } from "../client/raw.js";
9
-
10
- // ============================================================================
11
- // Types
12
- // ============================================================================
13
-
14
- export type PolicyScope = "agent" | "workspace" | "tenant" | "global";
15
- export type PolicyEnforcement = "hard" | "soft" | "audit_only";
16
-
17
- export interface PolicyRule {
18
- id: string;
19
- type: "allow" | "deny" | "require_approval" | "log";
20
- condition: string;
21
- action?: string;
22
- message?: string;
23
- }
24
-
25
- export interface Policy {
26
- id: string;
27
- name: string;
28
- description?: string;
29
- scope: PolicyScope;
30
- scope_id?: string;
31
- enforcement: PolicyEnforcement;
32
- rules: PolicyRule[];
33
- enabled: boolean;
34
- priority: number;
35
- created_at: string;
36
- updated_at: string;
37
- }
38
-
39
- export interface PolicyEvaluation {
40
- policy_id: string;
41
- policy_name: string;
42
- passed: boolean;
43
- violated_rules: PolicyRule[];
44
- audit_log_id?: string;
45
- }
46
-
47
- export interface PolicyEvaluationResult {
48
- allowed: boolean;
49
- evaluations: PolicyEvaluation[];
50
- requires_approval: boolean;
51
- blocking_policies: string[];
52
- }
53
-
54
- // ============================================================================
55
- // Helper for 501 responses
56
- // ============================================================================
57
-
58
- function notImplemented<T>(method: string): APIResponse<T> {
59
- return {
60
- data: undefined,
61
- error: {
62
- code: "NOT_IMPLEMENTED",
63
- message: `PoliciesModule.${method}() is not implemented. Backend endpoint not available.`,
64
- },
65
- response: new Response(null, { status: 501, statusText: "Not Implemented" }),
66
- };
67
- }
68
-
69
- // ============================================================================
70
- // Module
71
- // ============================================================================
72
-
73
- export class PoliciesModule {
74
- constructor(private client: RawClient, private headers: () => Record<string, string>) { }
75
-
76
- /** @returns 501 Not Implemented */
77
- async list(params?: {
78
- scope?: PolicyScope;
79
- scope_id?: string;
80
- enabled?: boolean;
81
- limit?: number;
82
- offset?: number;
83
- }): Promise<APIResponse<{ items: Policy[]; total: number }>> {
84
- return notImplemented<{ items: Policy[]; total: number }>("list");
85
- }
86
-
87
- /** @returns 501 Not Implemented */
88
- async get(policyId: string): Promise<APIResponse<Policy>> {
89
- return notImplemented<Policy>("get");
90
- }
91
-
92
- /** @returns 501 Not Implemented */
93
- async create(body: {
94
- name: string;
95
- description?: string;
96
- scope: PolicyScope;
97
- scope_id?: string;
98
- enforcement: PolicyEnforcement;
99
- rules: PolicyRule[];
100
- }): Promise<APIResponse<Policy>> {
101
- return notImplemented<Policy>("create");
102
- }
103
-
104
- /** @returns 501 Not Implemented */
105
- async evaluate(context: {
106
- agent_id: string;
107
- action: string;
108
- payload?: Record<string, unknown>;
109
- }): Promise<APIResponse<PolicyEvaluationResult>> {
110
- return notImplemented<PolicyEvaluationResult>("evaluate");
111
- }
112
- }