@auctra/sdk 0.3.0 → 0.3.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/CHANGELOG.md +12 -0
- package/README.md +46 -24
- package/dist/cjs/index.js +37 -1
- package/dist/esm/index.d.ts +70 -3
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +37 -1
- package/package.json +2 -2
- package/src/index.ts +106 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.3.2
|
|
4
|
+
|
|
5
|
+
- Add `updateIntent` for intent metadata and lifecycle changes via `PATCH /v1/intents/{id}`.
|
|
6
|
+
- Add `updateAgentStatus` and `deleteAgent` for agent lifecycle control.
|
|
7
|
+
- `updateIntentStatus` now delegates to `updateIntent`.
|
|
8
|
+
|
|
9
|
+
## 0.3.1
|
|
10
|
+
|
|
11
|
+
- Add `createAuthorityEdge` and validate authority actors before edges are created.
|
|
12
|
+
- Align intent-detail types with the REST response.
|
|
13
|
+
- Include intent, actor, trace, target, risk, and metadata in idempotency protection.
|
|
14
|
+
|
|
3
15
|
## 0.3.0
|
|
4
16
|
|
|
5
17
|
- Extend `evaluateAction` with trust infrastructure fields: `claimedIntentId`, `parentActionId`, `actor`, and `action` (target, description, riskLevel, metadata).
|
package/README.md
CHANGED
|
@@ -4,11 +4,15 @@
|
|
|
4
4
|
|
|
5
5
|
Official TypeScript SDK for [Auctra](https://auctra.tech) — authority infrastructure for AI agents.
|
|
6
6
|
|
|
7
|
-
Evaluate every agent action against delegated authority and org policies before execution.
|
|
7
|
+
Evaluate every agent action against delegated authority and org policies **before** execution.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
| Resource | URL |
|
|
10
|
+
| -------- | --- |
|
|
11
|
+
| **Console** | https://console.auctra.tech |
|
|
12
|
+
| **Sign up (free Builder)** | https://console.auctra.tech/auth/signup |
|
|
13
|
+
| **Docs** | https://auctra.tech/docs |
|
|
14
|
+
| **OpenAPI 3.1** | https://console.auctra.tech/v1/openapi.json |
|
|
15
|
+
| **API base URL** | `https://console.auctra.tech` (default — no `baseUrl` needed) |
|
|
12
16
|
|
|
13
17
|
## Install
|
|
14
18
|
|
|
@@ -18,7 +22,9 @@ npm install @auctra/sdk
|
|
|
18
22
|
|
|
19
23
|
Both ESM (`import`) and CommonJS (`require`) entry points are included.
|
|
20
24
|
|
|
21
|
-
## Quick start
|
|
25
|
+
## Quick start — evaluateAction
|
|
26
|
+
|
|
27
|
+
Copy-paste this before any consequential agent side effect (payments, refunds, prod changes, CRM writes):
|
|
22
28
|
|
|
23
29
|
```typescript
|
|
24
30
|
import { Auctra } from "@auctra/sdk";
|
|
@@ -41,14 +47,14 @@ const decision = await auctra.evaluateAction(
|
|
|
41
47
|
if (decision.decision === "allowed") {
|
|
42
48
|
// proceed with action
|
|
43
49
|
} else if (decision.decision === "require_approval") {
|
|
44
|
-
// pause for human review
|
|
50
|
+
// pause for human review in console.auctra.tech/console/reviews
|
|
45
51
|
console.log(decision.reason, decision.action_request_id);
|
|
46
52
|
} else {
|
|
47
53
|
throw new Error(decision.reason);
|
|
48
54
|
}
|
|
49
55
|
```
|
|
50
56
|
|
|
51
|
-
### Trust infrastructure (0.3.
|
|
57
|
+
### Trust infrastructure (0.3.1+)
|
|
52
58
|
|
|
53
59
|
Declare why an action is happening and trace it back to human-approved intent:
|
|
54
60
|
|
|
@@ -82,30 +88,35 @@ console.log(decision.intelligence?.trust_summary);
|
|
|
82
88
|
|
|
83
89
|
## API
|
|
84
90
|
|
|
85
|
-
| Method | Description
|
|
86
|
-
| ------------------------------------------- |
|
|
91
|
+
| Method | Description |
|
|
92
|
+
| ------------------------------------------- | --------------------------------------------------------------- |
|
|
87
93
|
| `evaluateAction(input, options)` | Idempotently check authority + trust trace before an agent acts |
|
|
88
94
|
| `listIntents()` | List human-approved intents |
|
|
89
95
|
| `createIntent(input)` | Declare a new intent |
|
|
96
|
+
| `updateIntent(id, input)` | Update intent metadata or lifecycle status |
|
|
97
|
+
| `updateIntentStatus(id, status)` | Change intent lifecycle status |
|
|
90
98
|
| `getIntent(id)` | Get intent detail and linked actions |
|
|
91
99
|
| `getAuthorityGraph()` | Fetch authority graph nodes and edges |
|
|
100
|
+
| `createAuthorityEdge(input)` | Add a validated authority edge |
|
|
92
101
|
| `getActionEvaluation(actionRequestId)` | Get decision record for an action |
|
|
93
|
-
| `getRootIntentChain(actionRequestId)` | Get root human intent chain (trust trace)
|
|
102
|
+
| `getRootIntentChain(actionRequestId)` | Get root human intent chain (trust trace) |
|
|
94
103
|
| `listAgents()` | List registered agents |
|
|
95
|
-
| `createAgent(input)` | Register a new agent
|
|
96
|
-
| `
|
|
97
|
-
| `
|
|
98
|
-
| `
|
|
99
|
-
| `
|
|
100
|
-
| `
|
|
101
|
-
| `
|
|
102
|
-
| `
|
|
103
|
-
| `
|
|
104
|
-
| `
|
|
105
|
-
| `
|
|
106
|
-
| `
|
|
107
|
-
| `
|
|
108
|
-
| `
|
|
104
|
+
| `createAgent(input)` | Register a new agent |
|
|
105
|
+
| `updateAgentStatus(id, input)` | Restrict, suspend, reactivate, or mark an agent compromised |
|
|
106
|
+
| `deleteAgent(id)` | Remove an agent with no evaluated actions |
|
|
107
|
+
| `getAgent(id)` | Get one registered agent |
|
|
108
|
+
| `listDelegations()` | List authority delegations |
|
|
109
|
+
| `getDelegation(id)` | Get one authority delegation |
|
|
110
|
+
| `createDelegation(input)` | Grant bounded authority |
|
|
111
|
+
| `revokeDelegation(id)` | Revoke a delegation |
|
|
112
|
+
| `listActionRequests()` | List recent evaluations |
|
|
113
|
+
| `approveActionRequest(id, approverUserId)` | Approve as an accountable reviewer |
|
|
114
|
+
| `rejectActionRequest(id, approverUserId)` | Reject as an accountable reviewer |
|
|
115
|
+
| `escalateActionRequest(id, approverUserId)` | Escalate as an accountable reviewer |
|
|
116
|
+
| `listPolicies()` | List org policies |
|
|
117
|
+
| `createPolicy(input)` | Create an org policy |
|
|
118
|
+
| `listAuditEvents()` | List audit ledger events |
|
|
119
|
+
| `listApiKeys()` | List API key metadata |
|
|
109
120
|
|
|
110
121
|
## REST API (curl)
|
|
111
122
|
|
|
@@ -127,6 +138,17 @@ The SDK applies bounded retries only to reads and idempotent evaluations. API fa
|
|
|
127
138
|
The machine-readable OpenAPI 3.1 contract is available at
|
|
128
139
|
`https://console.auctra.tech/v1/openapi.json`.
|
|
129
140
|
|
|
141
|
+
## Integration guides (blog)
|
|
142
|
+
|
|
143
|
+
Stack-specific walkthroughs with console steps:
|
|
144
|
+
|
|
145
|
+
| Stack | Guide |
|
|
146
|
+
| ----- | ----- |
|
|
147
|
+
| LangChain + MCP | https://auctra.tech/blog/langchain-mcp-authority-integration |
|
|
148
|
+
| OpenAI Agents SDK | https://auctra.tech/blog/openai-agents-sdk-authority-integration |
|
|
149
|
+
| Vercel AI SDK | https://auctra.tech/blog/vercel-ai-sdk-evaluate-action-hook |
|
|
150
|
+
| Stripe payments | https://auctra.tech/blog/stripe-agent-payments-authority-layer |
|
|
151
|
+
|
|
130
152
|
## License
|
|
131
153
|
|
|
132
154
|
MIT
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Auctra = exports.AuctraApiError = exports.AUCTRA_SDK_VERSION = void 0;
|
|
4
|
-
exports.AUCTRA_SDK_VERSION = "0.3.
|
|
4
|
+
exports.AUCTRA_SDK_VERSION = "0.3.2";
|
|
5
5
|
class AuctraApiError extends Error {
|
|
6
6
|
status;
|
|
7
7
|
code;
|
|
@@ -156,9 +156,35 @@ class Auctra {
|
|
|
156
156
|
async getIntent(intentId) {
|
|
157
157
|
return this.request("GET", `/v1/intents/${encodeURIComponent(intentId)}`);
|
|
158
158
|
}
|
|
159
|
+
async updateIntentStatus(intentId, status) {
|
|
160
|
+
return this.updateIntent(intentId, { status });
|
|
161
|
+
}
|
|
162
|
+
async updateIntent(intentId, input) {
|
|
163
|
+
return this.request("PATCH", `/v1/intents/${encodeURIComponent(intentId)}`, {
|
|
164
|
+
status: input.status,
|
|
165
|
+
title: input.title,
|
|
166
|
+
description: input.description,
|
|
167
|
+
intent_type: input.intentType,
|
|
168
|
+
risk_level: input.riskLevel,
|
|
169
|
+
max_risk_level: input.maxRiskLevel,
|
|
170
|
+
expires_at: input.expiresAt,
|
|
171
|
+
});
|
|
172
|
+
}
|
|
159
173
|
async getAuthorityGraph() {
|
|
160
174
|
return this.request("GET", "/v1/authority/graph");
|
|
161
175
|
}
|
|
176
|
+
async createAuthorityEdge(input) {
|
|
177
|
+
return this.request("POST", "/v1/authority/edges", {
|
|
178
|
+
from_actor_id: input.fromActorId,
|
|
179
|
+
from_actor_type: input.fromActorType,
|
|
180
|
+
to_actor_id: input.toActorId,
|
|
181
|
+
to_actor_type: input.toActorType,
|
|
182
|
+
authority_scope: input.authorityScope,
|
|
183
|
+
conditions: input.conditions,
|
|
184
|
+
max_risk_level: input.maxRiskLevel,
|
|
185
|
+
expires_at: input.expiresAt,
|
|
186
|
+
});
|
|
187
|
+
}
|
|
162
188
|
async getActionEvaluation(actionRequestId) {
|
|
163
189
|
return this.request("GET", `/v1/action-requests/${encodeURIComponent(actionRequestId)}/evaluation`);
|
|
164
190
|
}
|
|
@@ -182,6 +208,16 @@ class Auctra {
|
|
|
182
208
|
sponsor_user_id: input.sponsorUserId,
|
|
183
209
|
});
|
|
184
210
|
}
|
|
211
|
+
async updateAgentStatus(agentId, input) {
|
|
212
|
+
return this.request("PATCH", `/v1/agents/${encodeURIComponent(agentId)}`, {
|
|
213
|
+
status: input.status,
|
|
214
|
+
reason: input.reason,
|
|
215
|
+
revoke_delegations: input.revokeDelegations,
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
async deleteAgent(agentId) {
|
|
219
|
+
return this.request("DELETE", `/v1/agents/${encodeURIComponent(agentId)}`);
|
|
220
|
+
}
|
|
185
221
|
async listDelegations() {
|
|
186
222
|
return this.request("GET", "/v1/delegations");
|
|
187
223
|
}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
export declare const AUCTRA_SDK_VERSION = "0.3.
|
|
1
|
+
export declare const AUCTRA_SDK_VERSION = "0.3.2";
|
|
2
2
|
export type AgentEnvironment = "dev" | "staging" | "production";
|
|
3
3
|
export type AuthorityLevel = "low" | "medium" | "high" | "critical";
|
|
4
4
|
export type Decision = "allowed" | "blocked" | "require_approval";
|
|
5
5
|
export type PolicyType = "spending" | "data_access" | "communication" | "approval";
|
|
6
6
|
export type ActorType = "human" | "agent" | "service" | "tool";
|
|
7
7
|
export type RiskLevel = "low" | "medium" | "high" | "critical";
|
|
8
|
+
export type IntentStatus = "active" | "expired" | "completed" | "revoked" | "suspended";
|
|
8
9
|
export type EvaluateActionInput = {
|
|
9
10
|
agentId: string;
|
|
10
11
|
actionType: string;
|
|
@@ -124,6 +125,14 @@ export type ActionRequest = {
|
|
|
124
125
|
risk_score: number;
|
|
125
126
|
delegation_id: string | null;
|
|
126
127
|
policy_ids: string[];
|
|
128
|
+
claimed_intent_id: string | null;
|
|
129
|
+
parent_action_id: string | null;
|
|
130
|
+
actor_id: string | null;
|
|
131
|
+
actor_type: ActorType;
|
|
132
|
+
action_target: string | null;
|
|
133
|
+
action_description: string | null;
|
|
134
|
+
action_risk_level: RiskLevel | null;
|
|
135
|
+
action_metadata: Record<string, unknown>;
|
|
127
136
|
pending_approval_id: string | null;
|
|
128
137
|
created_at: string;
|
|
129
138
|
decided_at: string | null;
|
|
@@ -133,7 +142,7 @@ export type Intent = {
|
|
|
133
142
|
title: string;
|
|
134
143
|
description: string | null;
|
|
135
144
|
intent_type: string | null;
|
|
136
|
-
status:
|
|
145
|
+
status: IntentStatus;
|
|
137
146
|
risk_level: RiskLevel;
|
|
138
147
|
max_risk_level: RiskLevel;
|
|
139
148
|
expires_at: string | null;
|
|
@@ -146,7 +155,7 @@ export type Intent = {
|
|
|
146
155
|
linked_actions: number;
|
|
147
156
|
};
|
|
148
157
|
export type IntentDetail = Omit<Intent, "linked_actions"> & {
|
|
149
|
-
|
|
158
|
+
linked_actions: Array<{
|
|
150
159
|
action_request_id: string;
|
|
151
160
|
action_type: string;
|
|
152
161
|
summary: string;
|
|
@@ -155,6 +164,16 @@ export type IntentDetail = Omit<Intent, "linked_actions"> & {
|
|
|
155
164
|
alignment_score: number | null;
|
|
156
165
|
}>;
|
|
157
166
|
};
|
|
167
|
+
export type CreateAuthorityEdgeInput = {
|
|
168
|
+
fromActorId: string;
|
|
169
|
+
fromActorType: ActorType;
|
|
170
|
+
toActorId: string;
|
|
171
|
+
toActorType: ActorType;
|
|
172
|
+
authorityScope: string;
|
|
173
|
+
conditions?: Record<string, unknown>;
|
|
174
|
+
maxRiskLevel?: RiskLevel;
|
|
175
|
+
expiresAt?: string;
|
|
176
|
+
};
|
|
158
177
|
export type CreateIntentInput = {
|
|
159
178
|
title: string;
|
|
160
179
|
description?: string;
|
|
@@ -163,6 +182,20 @@ export type CreateIntentInput = {
|
|
|
163
182
|
maxRiskLevel?: RiskLevel;
|
|
164
183
|
expiresAt?: string;
|
|
165
184
|
};
|
|
185
|
+
export type UpdateIntentInput = {
|
|
186
|
+
status?: Exclude<IntentStatus, "expired">;
|
|
187
|
+
title?: string;
|
|
188
|
+
description?: string | null;
|
|
189
|
+
intentType?: string | null;
|
|
190
|
+
riskLevel?: RiskLevel;
|
|
191
|
+
maxRiskLevel?: RiskLevel;
|
|
192
|
+
expiresAt?: string | null;
|
|
193
|
+
};
|
|
194
|
+
export type UpdateAgentStatusInput = {
|
|
195
|
+
status: Agent["status"];
|
|
196
|
+
reason?: string;
|
|
197
|
+
revokeDelegations?: boolean;
|
|
198
|
+
};
|
|
166
199
|
export type AuthorityGraph = {
|
|
167
200
|
nodes: Array<{
|
|
168
201
|
id: string;
|
|
@@ -290,9 +323,33 @@ export declare class Auctra {
|
|
|
290
323
|
getIntent(intentId: string): Promise<{
|
|
291
324
|
intent: IntentDetail;
|
|
292
325
|
}>;
|
|
326
|
+
updateIntentStatus(intentId: string, status: Exclude<IntentStatus, "expired">): Promise<{
|
|
327
|
+
intent: {
|
|
328
|
+
id: string;
|
|
329
|
+
title: string;
|
|
330
|
+
status: IntentStatus;
|
|
331
|
+
};
|
|
332
|
+
}>;
|
|
333
|
+
updateIntent(intentId: string, input: UpdateIntentInput): Promise<{
|
|
334
|
+
intent: {
|
|
335
|
+
id: string;
|
|
336
|
+
title: string;
|
|
337
|
+
status: IntentStatus;
|
|
338
|
+
description?: string | null;
|
|
339
|
+
intent_type?: string | null;
|
|
340
|
+
risk_level?: RiskLevel;
|
|
341
|
+
max_risk_level?: RiskLevel;
|
|
342
|
+
expires_at?: string | null;
|
|
343
|
+
};
|
|
344
|
+
}>;
|
|
293
345
|
getAuthorityGraph(): Promise<{
|
|
294
346
|
authority_graph: AuthorityGraph;
|
|
295
347
|
}>;
|
|
348
|
+
createAuthorityEdge(input: CreateAuthorityEdgeInput): Promise<{
|
|
349
|
+
edge: {
|
|
350
|
+
id: string;
|
|
351
|
+
};
|
|
352
|
+
}>;
|
|
296
353
|
getActionEvaluation(actionRequestId: string): Promise<{
|
|
297
354
|
evaluation: ActionEvaluation;
|
|
298
355
|
}>;
|
|
@@ -308,6 +365,16 @@ export declare class Auctra {
|
|
|
308
365
|
createAgent(input: CreateAgentInput): Promise<{
|
|
309
366
|
agent: Agent;
|
|
310
367
|
}>;
|
|
368
|
+
updateAgentStatus(agentId: string, input: UpdateAgentStatusInput): Promise<{
|
|
369
|
+
agent: {
|
|
370
|
+
id: string;
|
|
371
|
+
name: string;
|
|
372
|
+
status: Agent["status"];
|
|
373
|
+
};
|
|
374
|
+
}>;
|
|
375
|
+
deleteAgent(agentId: string): Promise<{
|
|
376
|
+
ok: true;
|
|
377
|
+
}>;
|
|
311
378
|
listDelegations(): Promise<{
|
|
312
379
|
delegations: Delegation[];
|
|
313
380
|
}>;
|
package/dist/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,UAAU,CAAC;AAE1C,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,SAAS,GAAG,YAAY,CAAC;AAChE,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,CAAC;AACpE,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,kBAAkB,CAAC;AAClE,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,aAAa,GAAG,eAAe,GAAG,UAAU,CAAC;AACnF,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AAC/D,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,CAAC;AAE/D,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,KAAK,CAAC,EAAE;QACN,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,IAAI,CAAC,EAAE,SAAS,CAAC;QACjB,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IACF,MAAM,CAAC,EAAE;QACP,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,SAAS,CAAC,EAAE,SAAS,CAAC;QACtB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACpC,CAAC;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,EAAE,CAAA;KAAE,CAAC;IAI1D,WAAW,IAAI,OAAO,CAAC;QAAE,QAAQ,EAAE,aAAa,EAAE,CAAA;KAAE,CAAC;CAG5D"}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const AUCTRA_SDK_VERSION = "0.3.
|
|
1
|
+
export const AUCTRA_SDK_VERSION = "0.3.2";
|
|
2
2
|
export class AuctraApiError extends Error {
|
|
3
3
|
status;
|
|
4
4
|
code;
|
|
@@ -152,9 +152,35 @@ export class Auctra {
|
|
|
152
152
|
async getIntent(intentId) {
|
|
153
153
|
return this.request("GET", `/v1/intents/${encodeURIComponent(intentId)}`);
|
|
154
154
|
}
|
|
155
|
+
async updateIntentStatus(intentId, status) {
|
|
156
|
+
return this.updateIntent(intentId, { status });
|
|
157
|
+
}
|
|
158
|
+
async updateIntent(intentId, input) {
|
|
159
|
+
return this.request("PATCH", `/v1/intents/${encodeURIComponent(intentId)}`, {
|
|
160
|
+
status: input.status,
|
|
161
|
+
title: input.title,
|
|
162
|
+
description: input.description,
|
|
163
|
+
intent_type: input.intentType,
|
|
164
|
+
risk_level: input.riskLevel,
|
|
165
|
+
max_risk_level: input.maxRiskLevel,
|
|
166
|
+
expires_at: input.expiresAt,
|
|
167
|
+
});
|
|
168
|
+
}
|
|
155
169
|
async getAuthorityGraph() {
|
|
156
170
|
return this.request("GET", "/v1/authority/graph");
|
|
157
171
|
}
|
|
172
|
+
async createAuthorityEdge(input) {
|
|
173
|
+
return this.request("POST", "/v1/authority/edges", {
|
|
174
|
+
from_actor_id: input.fromActorId,
|
|
175
|
+
from_actor_type: input.fromActorType,
|
|
176
|
+
to_actor_id: input.toActorId,
|
|
177
|
+
to_actor_type: input.toActorType,
|
|
178
|
+
authority_scope: input.authorityScope,
|
|
179
|
+
conditions: input.conditions,
|
|
180
|
+
max_risk_level: input.maxRiskLevel,
|
|
181
|
+
expires_at: input.expiresAt,
|
|
182
|
+
});
|
|
183
|
+
}
|
|
158
184
|
async getActionEvaluation(actionRequestId) {
|
|
159
185
|
return this.request("GET", `/v1/action-requests/${encodeURIComponent(actionRequestId)}/evaluation`);
|
|
160
186
|
}
|
|
@@ -178,6 +204,16 @@ export class Auctra {
|
|
|
178
204
|
sponsor_user_id: input.sponsorUserId,
|
|
179
205
|
});
|
|
180
206
|
}
|
|
207
|
+
async updateAgentStatus(agentId, input) {
|
|
208
|
+
return this.request("PATCH", `/v1/agents/${encodeURIComponent(agentId)}`, {
|
|
209
|
+
status: input.status,
|
|
210
|
+
reason: input.reason,
|
|
211
|
+
revoke_delegations: input.revokeDelegations,
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
async deleteAgent(agentId) {
|
|
215
|
+
return this.request("DELETE", `/v1/agents/${encodeURIComponent(agentId)}`);
|
|
216
|
+
}
|
|
181
217
|
async listDelegations() {
|
|
182
218
|
return this.request("GET", "/v1/delegations");
|
|
183
219
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@auctra/sdk",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "Authority delegation SDK for AI agents — evaluate agent actions against delegated authority and org policies",
|
|
5
5
|
"homepage": "https://auctra.tech/docs",
|
|
6
6
|
"bugs": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"clean": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\"",
|
|
30
30
|
"build": "npm run clean && tsc -p tsconfig.json && tsc -p tsconfig.cjs.json && node scripts/finalize-build.mjs",
|
|
31
31
|
"test": "npm run build && node --test test/*.test.mjs",
|
|
32
|
-
"check": "npm run test &&
|
|
32
|
+
"check": "npm run test && node scripts/pack-dry-run.mjs",
|
|
33
33
|
"publish:local": "npm publish --access public --provenance=false",
|
|
34
34
|
"prepublishOnly": "npm run check"
|
|
35
35
|
},
|
package/src/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const AUCTRA_SDK_VERSION = "0.3.
|
|
1
|
+
export const AUCTRA_SDK_VERSION = "0.3.2";
|
|
2
2
|
|
|
3
3
|
export type AgentEnvironment = "dev" | "staging" | "production";
|
|
4
4
|
export type AuthorityLevel = "low" | "medium" | "high" | "critical";
|
|
@@ -6,6 +6,7 @@ export type Decision = "allowed" | "blocked" | "require_approval";
|
|
|
6
6
|
export type PolicyType = "spending" | "data_access" | "communication" | "approval";
|
|
7
7
|
export type ActorType = "human" | "agent" | "service" | "tool";
|
|
8
8
|
export type RiskLevel = "low" | "medium" | "high" | "critical";
|
|
9
|
+
export type IntentStatus = "active" | "expired" | "completed" | "revoked" | "suspended";
|
|
9
10
|
|
|
10
11
|
export type EvaluateActionInput = {
|
|
11
12
|
agentId: string;
|
|
@@ -121,6 +122,14 @@ export type ActionRequest = {
|
|
|
121
122
|
risk_score: number;
|
|
122
123
|
delegation_id: string | null;
|
|
123
124
|
policy_ids: string[];
|
|
125
|
+
claimed_intent_id: string | null;
|
|
126
|
+
parent_action_id: string | null;
|
|
127
|
+
actor_id: string | null;
|
|
128
|
+
actor_type: ActorType;
|
|
129
|
+
action_target: string | null;
|
|
130
|
+
action_description: string | null;
|
|
131
|
+
action_risk_level: RiskLevel | null;
|
|
132
|
+
action_metadata: Record<string, unknown>;
|
|
124
133
|
pending_approval_id: string | null;
|
|
125
134
|
created_at: string;
|
|
126
135
|
decided_at: string | null;
|
|
@@ -131,7 +140,7 @@ export type Intent = {
|
|
|
131
140
|
title: string;
|
|
132
141
|
description: string | null;
|
|
133
142
|
intent_type: string | null;
|
|
134
|
-
status:
|
|
143
|
+
status: IntentStatus;
|
|
135
144
|
risk_level: RiskLevel;
|
|
136
145
|
max_risk_level: RiskLevel;
|
|
137
146
|
expires_at: string | null;
|
|
@@ -141,7 +150,7 @@ export type Intent = {
|
|
|
141
150
|
};
|
|
142
151
|
|
|
143
152
|
export type IntentDetail = Omit<Intent, "linked_actions"> & {
|
|
144
|
-
|
|
153
|
+
linked_actions: Array<{
|
|
145
154
|
action_request_id: string;
|
|
146
155
|
action_type: string;
|
|
147
156
|
summary: string;
|
|
@@ -151,6 +160,17 @@ export type IntentDetail = Omit<Intent, "linked_actions"> & {
|
|
|
151
160
|
}>;
|
|
152
161
|
};
|
|
153
162
|
|
|
163
|
+
export type CreateAuthorityEdgeInput = {
|
|
164
|
+
fromActorId: string;
|
|
165
|
+
fromActorType: ActorType;
|
|
166
|
+
toActorId: string;
|
|
167
|
+
toActorType: ActorType;
|
|
168
|
+
authorityScope: string;
|
|
169
|
+
conditions?: Record<string, unknown>;
|
|
170
|
+
maxRiskLevel?: RiskLevel;
|
|
171
|
+
expiresAt?: string;
|
|
172
|
+
};
|
|
173
|
+
|
|
154
174
|
export type CreateIntentInput = {
|
|
155
175
|
title: string;
|
|
156
176
|
description?: string;
|
|
@@ -160,6 +180,22 @@ export type CreateIntentInput = {
|
|
|
160
180
|
expiresAt?: string;
|
|
161
181
|
};
|
|
162
182
|
|
|
183
|
+
export type UpdateIntentInput = {
|
|
184
|
+
status?: Exclude<IntentStatus, "expired">;
|
|
185
|
+
title?: string;
|
|
186
|
+
description?: string | null;
|
|
187
|
+
intentType?: string | null;
|
|
188
|
+
riskLevel?: RiskLevel;
|
|
189
|
+
maxRiskLevel?: RiskLevel;
|
|
190
|
+
expiresAt?: string | null;
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
export type UpdateAgentStatusInput = {
|
|
194
|
+
status: Agent["status"];
|
|
195
|
+
reason?: string;
|
|
196
|
+
revokeDelegations?: boolean;
|
|
197
|
+
};
|
|
198
|
+
|
|
163
199
|
export type AuthorityGraph = {
|
|
164
200
|
nodes: Array<{ id: string; type: ActorType; label: string }>;
|
|
165
201
|
edges: Array<{
|
|
@@ -429,7 +465,9 @@ export class Auctra {
|
|
|
429
465
|
return this.request("GET", "/v1/intents");
|
|
430
466
|
}
|
|
431
467
|
|
|
432
|
-
async createIntent(
|
|
468
|
+
async createIntent(
|
|
469
|
+
input: CreateIntentInput,
|
|
470
|
+
): Promise<{ intent: { id: string; title: string; status: string } }> {
|
|
433
471
|
return this.request("POST", "/v1/intents", {
|
|
434
472
|
title: input.title,
|
|
435
473
|
description: input.description,
|
|
@@ -444,10 +482,56 @@ export class Auctra {
|
|
|
444
482
|
return this.request("GET", `/v1/intents/${encodeURIComponent(intentId)}`);
|
|
445
483
|
}
|
|
446
484
|
|
|
485
|
+
async updateIntentStatus(
|
|
486
|
+
intentId: string,
|
|
487
|
+
status: Exclude<IntentStatus, "expired">,
|
|
488
|
+
): Promise<{ intent: { id: string; title: string; status: IntentStatus } }> {
|
|
489
|
+
return this.updateIntent(intentId, { status });
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
async updateIntent(
|
|
493
|
+
intentId: string,
|
|
494
|
+
input: UpdateIntentInput,
|
|
495
|
+
): Promise<{
|
|
496
|
+
intent: {
|
|
497
|
+
id: string;
|
|
498
|
+
title: string;
|
|
499
|
+
status: IntentStatus;
|
|
500
|
+
description?: string | null;
|
|
501
|
+
intent_type?: string | null;
|
|
502
|
+
risk_level?: RiskLevel;
|
|
503
|
+
max_risk_level?: RiskLevel;
|
|
504
|
+
expires_at?: string | null;
|
|
505
|
+
};
|
|
506
|
+
}> {
|
|
507
|
+
return this.request("PATCH", `/v1/intents/${encodeURIComponent(intentId)}`, {
|
|
508
|
+
status: input.status,
|
|
509
|
+
title: input.title,
|
|
510
|
+
description: input.description,
|
|
511
|
+
intent_type: input.intentType,
|
|
512
|
+
risk_level: input.riskLevel,
|
|
513
|
+
max_risk_level: input.maxRiskLevel,
|
|
514
|
+
expires_at: input.expiresAt,
|
|
515
|
+
});
|
|
516
|
+
}
|
|
517
|
+
|
|
447
518
|
async getAuthorityGraph(): Promise<{ authority_graph: AuthorityGraph }> {
|
|
448
519
|
return this.request("GET", "/v1/authority/graph");
|
|
449
520
|
}
|
|
450
521
|
|
|
522
|
+
async createAuthorityEdge(input: CreateAuthorityEdgeInput): Promise<{ edge: { id: string } }> {
|
|
523
|
+
return this.request("POST", "/v1/authority/edges", {
|
|
524
|
+
from_actor_id: input.fromActorId,
|
|
525
|
+
from_actor_type: input.fromActorType,
|
|
526
|
+
to_actor_id: input.toActorId,
|
|
527
|
+
to_actor_type: input.toActorType,
|
|
528
|
+
authority_scope: input.authorityScope,
|
|
529
|
+
conditions: input.conditions,
|
|
530
|
+
max_risk_level: input.maxRiskLevel,
|
|
531
|
+
expires_at: input.expiresAt,
|
|
532
|
+
});
|
|
533
|
+
}
|
|
534
|
+
|
|
451
535
|
async getActionEvaluation(actionRequestId: string): Promise<{ evaluation: ActionEvaluation }> {
|
|
452
536
|
return this.request(
|
|
453
537
|
"GET",
|
|
@@ -455,7 +539,9 @@ export class Auctra {
|
|
|
455
539
|
);
|
|
456
540
|
}
|
|
457
541
|
|
|
458
|
-
async getRootIntentChain(
|
|
542
|
+
async getRootIntentChain(
|
|
543
|
+
actionRequestId: string,
|
|
544
|
+
): Promise<{ root_intent_chain: RootIntentChain }> {
|
|
459
545
|
return this.request(
|
|
460
546
|
"GET",
|
|
461
547
|
`/v1/action-requests/${encodeURIComponent(actionRequestId)}/root-intent`,
|
|
@@ -482,6 +568,21 @@ export class Auctra {
|
|
|
482
568
|
});
|
|
483
569
|
}
|
|
484
570
|
|
|
571
|
+
async updateAgentStatus(
|
|
572
|
+
agentId: string,
|
|
573
|
+
input: UpdateAgentStatusInput,
|
|
574
|
+
): Promise<{ agent: { id: string; name: string; status: Agent["status"] } }> {
|
|
575
|
+
return this.request("PATCH", `/v1/agents/${encodeURIComponent(agentId)}`, {
|
|
576
|
+
status: input.status,
|
|
577
|
+
reason: input.reason,
|
|
578
|
+
revoke_delegations: input.revokeDelegations,
|
|
579
|
+
});
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
async deleteAgent(agentId: string): Promise<{ ok: true }> {
|
|
583
|
+
return this.request("DELETE", `/v1/agents/${encodeURIComponent(agentId)}`);
|
|
584
|
+
}
|
|
585
|
+
|
|
485
586
|
async listDelegations(): Promise<{ delegations: Delegation[] }> {
|
|
486
587
|
return this.request("GET", "/v1/delegations");
|
|
487
588
|
}
|