@auctra/sdk 0.2.1 → 0.3.1

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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.1
4
+
5
+ - Add `createAuthorityEdge` and validate authority actors before edges are created.
6
+ - Align intent-detail types with the REST response.
7
+ - Include intent, actor, trace, target, risk, and metadata in idempotency protection.
8
+
9
+ ## 0.3.0
10
+
11
+ - Extend `evaluateAction` with trust infrastructure fields: `claimedIntentId`, `parentActionId`, `actor`, and `action` (target, description, riskLevel, metadata).
12
+ - Return intelligence metadata on evaluation: authority validity, root intent validity, intent status, trust summary.
13
+ - Add `listIntents`, `createIntent`, `getIntent`, `getAuthorityGraph`, `getActionEvaluation`, and `getRootIntentChain`.
14
+
3
15
  ## 0.2.1
4
16
 
5
17
  - Add complete response types for agents, delegations, action requests, policies, audit events, and API keys.
package/README.md CHANGED
@@ -48,6 +48,31 @@ if (decision.decision === "allowed") {
48
48
  }
49
49
  ```
50
50
 
51
+ ### Trust infrastructure (0.3.0+)
52
+
53
+ Declare why an action is happening and trace it back to human-approved intent:
54
+
55
+ ```typescript
56
+ const intent = await auctra.createIntent({
57
+ title: "Renew SaaS contracts under $500/month for Q3",
58
+ description: "Procurement agent may renew eligible vendor subscriptions.",
59
+ });
60
+
61
+ const decision = await auctra.evaluateAction({
62
+ agentId: "your-agent-uuid",
63
+ actionType: "send_payment",
64
+ claimedIntentId: intent.intent.id,
65
+ action: {
66
+ target: "vendor:slack",
67
+ description: "Renew Slack Team plan",
68
+ riskLevel: "medium",
69
+ },
70
+ payload: { amount: 420, currency: "USD" },
71
+ });
72
+
73
+ console.log(decision.intelligence?.trust_summary);
74
+ ```
75
+
51
76
  ## Get an API key
52
77
 
53
78
  1. [Sign up](https://console.auctra.tech/auth/signup) and create an organization
@@ -57,24 +82,31 @@ if (decision.decision === "allowed") {
57
82
 
58
83
  ## API
59
84
 
60
- | Method | Description |
61
- | ------------------------------------------- | ------------------------------------------------- |
62
- | `evaluateAction(input, options)` | Idempotently check authority before an agent acts |
63
- | `listAgents()` | List registered agents |
64
- | `createAgent(input)` | Register a new agent |
65
- | `getAgent(id)` | Get one registered agent |
66
- | `listDelegations()` | List authority delegations |
67
- | `getDelegation(id)` | Get one authority delegation |
68
- | `createDelegation(input)` | Grant bounded authority |
69
- | `revokeDelegation(id)` | Revoke a delegation |
70
- | `listActionRequests()` | List recent evaluations |
71
- | `approveActionRequest(id, approverUserId)` | Approve as an accountable reviewer |
72
- | `rejectActionRequest(id, approverUserId)` | Reject as an accountable reviewer |
73
- | `escalateActionRequest(id, approverUserId)` | Escalate as an accountable reviewer |
74
- | `listPolicies()` | List org policies |
75
- | `createPolicy(input)` | Create an org policy |
76
- | `listAuditEvents()` | List audit ledger events |
77
- | `listApiKeys()` | List API key metadata |
85
+ | Method | Description |
86
+ | ------------------------------------------- | --------------------------------------------------------------- |
87
+ | `evaluateAction(input, options)` | Idempotently check authority + trust trace before an agent acts |
88
+ | `listIntents()` | List human-approved intents |
89
+ | `createIntent(input)` | Declare a new intent |
90
+ | `getIntent(id)` | Get intent detail and linked actions |
91
+ | `getAuthorityGraph()` | Fetch authority graph nodes and edges |
92
+ | `createAuthorityEdge(input)` | Add a validated authority edge |
93
+ | `getActionEvaluation(actionRequestId)` | Get decision record for an action |
94
+ | `getRootIntentChain(actionRequestId)` | Get root human intent chain (trust trace) |
95
+ | `listAgents()` | List registered agents |
96
+ | `createAgent(input)` | Register a new agent |
97
+ | `getAgent(id)` | Get one registered agent |
98
+ | `listDelegations()` | List authority delegations |
99
+ | `getDelegation(id)` | Get one authority delegation |
100
+ | `createDelegation(input)` | Grant bounded authority |
101
+ | `revokeDelegation(id)` | Revoke a delegation |
102
+ | `listActionRequests()` | List recent evaluations |
103
+ | `approveActionRequest(id, approverUserId)` | Approve as an accountable reviewer |
104
+ | `rejectActionRequest(id, approverUserId)` | Reject as an accountable reviewer |
105
+ | `escalateActionRequest(id, approverUserId)` | Escalate as an accountable reviewer |
106
+ | `listPolicies()` | List org policies |
107
+ | `createPolicy(input)` | Create an org policy |
108
+ | `listAuditEvents()` | List audit ledger events |
109
+ | `listApiKeys()` | List API key metadata |
78
110
 
79
111
  ## REST API (curl)
80
112
 
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.2.1";
4
+ exports.AUCTRA_SDK_VERSION = "0.3.1";
5
5
  class AuctraApiError extends Error {
6
6
  status;
7
7
  code;
@@ -117,7 +117,65 @@ class Auctra {
117
117
  }
118
118
  async evaluateAction(input, options = {}) {
119
119
  const idempotencyKey = options.idempotencyKey ?? crypto.randomUUID();
120
- return this.request("POST", "/v1/action-requests/evaluate", { agent_id: input.agentId, action_type: input.actionType, payload: input.payload ?? {} }, { ...options, idempotencyKey });
120
+ return this.request("POST", "/v1/action-requests/evaluate", {
121
+ agent_id: input.agentId,
122
+ action_type: input.actionType,
123
+ payload: input.payload ?? {},
124
+ claimed_intent_id: input.claimedIntentId,
125
+ parent_action_id: input.parentActionId,
126
+ actor: input.actor
127
+ ? {
128
+ id: input.actor.id,
129
+ type: input.actor.type,
130
+ name: input.actor.name,
131
+ }
132
+ : undefined,
133
+ action: input.action
134
+ ? {
135
+ target: input.action.target,
136
+ description: input.action.description,
137
+ risk_level: input.action.riskLevel,
138
+ metadata: input.action.metadata,
139
+ }
140
+ : undefined,
141
+ }, { ...options, idempotencyKey });
142
+ }
143
+ async listIntents() {
144
+ return this.request("GET", "/v1/intents");
145
+ }
146
+ async createIntent(input) {
147
+ return this.request("POST", "/v1/intents", {
148
+ title: input.title,
149
+ description: input.description,
150
+ intent_type: input.intentType,
151
+ risk_level: input.riskLevel,
152
+ max_risk_level: input.maxRiskLevel,
153
+ expires_at: input.expiresAt,
154
+ });
155
+ }
156
+ async getIntent(intentId) {
157
+ return this.request("GET", `/v1/intents/${encodeURIComponent(intentId)}`);
158
+ }
159
+ async getAuthorityGraph() {
160
+ return this.request("GET", "/v1/authority/graph");
161
+ }
162
+ async createAuthorityEdge(input) {
163
+ return this.request("POST", "/v1/authority/edges", {
164
+ from_actor_id: input.fromActorId,
165
+ from_actor_type: input.fromActorType,
166
+ to_actor_id: input.toActorId,
167
+ to_actor_type: input.toActorType,
168
+ authority_scope: input.authorityScope,
169
+ conditions: input.conditions,
170
+ max_risk_level: input.maxRiskLevel,
171
+ expires_at: input.expiresAt,
172
+ });
173
+ }
174
+ async getActionEvaluation(actionRequestId) {
175
+ return this.request("GET", `/v1/action-requests/${encodeURIComponent(actionRequestId)}/evaluation`);
176
+ }
177
+ async getRootIntentChain(actionRequestId) {
178
+ return this.request("GET", `/v1/action-requests/${encodeURIComponent(actionRequestId)}/root-intent`);
121
179
  }
122
180
  async listAgents() {
123
181
  return this.request("GET", "/v1/agents");
@@ -1,12 +1,27 @@
1
- export declare const AUCTRA_SDK_VERSION = "0.2.1";
1
+ export declare const AUCTRA_SDK_VERSION = "0.3.1";
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
+ export type ActorType = "human" | "agent" | "service" | "tool";
7
+ export type RiskLevel = "low" | "medium" | "high" | "critical";
6
8
  export type EvaluateActionInput = {
7
9
  agentId: string;
8
10
  actionType: string;
9
11
  payload?: Record<string, unknown>;
12
+ claimedIntentId?: string;
13
+ parentActionId?: string;
14
+ actor?: {
15
+ id?: string;
16
+ type?: ActorType;
17
+ name?: string;
18
+ };
19
+ action?: {
20
+ target?: string;
21
+ description?: string;
22
+ riskLevel?: RiskLevel;
23
+ metadata?: Record<string, unknown>;
24
+ };
10
25
  };
11
26
  export type EvaluateActionResponse = {
12
27
  decision: Decision;
@@ -17,6 +32,12 @@ export type EvaluateActionResponse = {
17
32
  sponsor: string;
18
33
  matched_policies: string[];
19
34
  action_request_id: string;
35
+ intelligence?: {
36
+ authority_valid: boolean;
37
+ root_intent_valid: boolean;
38
+ intent_status: string;
39
+ trust_summary?: string;
40
+ };
20
41
  };
21
42
  export type RequestOptions = {
22
43
  idempotencyKey?: string;
@@ -103,10 +124,106 @@ export type ActionRequest = {
103
124
  risk_score: number;
104
125
  delegation_id: string | null;
105
126
  policy_ids: string[];
127
+ claimed_intent_id: string | null;
128
+ parent_action_id: string | null;
129
+ actor_id: string | null;
130
+ actor_type: ActorType;
131
+ action_target: string | null;
132
+ action_description: string | null;
133
+ action_risk_level: RiskLevel | null;
134
+ action_metadata: Record<string, unknown>;
106
135
  pending_approval_id: string | null;
107
136
  created_at: string;
108
137
  decided_at: string | null;
109
138
  };
139
+ export type Intent = {
140
+ id: string;
141
+ title: string;
142
+ description: string | null;
143
+ intent_type: string | null;
144
+ status: string;
145
+ risk_level: RiskLevel;
146
+ max_risk_level: RiskLevel;
147
+ expires_at: string | null;
148
+ created_at: string;
149
+ owner: {
150
+ id: string;
151
+ full_name: string;
152
+ email: string;
153
+ } | null;
154
+ linked_actions: number;
155
+ };
156
+ export type IntentDetail = Omit<Intent, "linked_actions"> & {
157
+ linked_actions: Array<{
158
+ action_request_id: string;
159
+ action_type: string;
160
+ summary: string;
161
+ decision: string;
162
+ alignment_status: string;
163
+ alignment_score: number | null;
164
+ }>;
165
+ };
166
+ export type CreateAuthorityEdgeInput = {
167
+ fromActorId: string;
168
+ fromActorType: ActorType;
169
+ toActorId: string;
170
+ toActorType: ActorType;
171
+ authorityScope: string;
172
+ conditions?: Record<string, unknown>;
173
+ maxRiskLevel?: RiskLevel;
174
+ expiresAt?: string;
175
+ };
176
+ export type CreateIntentInput = {
177
+ title: string;
178
+ description?: string;
179
+ intentType?: string;
180
+ riskLevel?: RiskLevel;
181
+ maxRiskLevel?: RiskLevel;
182
+ expiresAt?: string;
183
+ };
184
+ export type AuthorityGraph = {
185
+ nodes: Array<{
186
+ id: string;
187
+ type: ActorType;
188
+ label: string;
189
+ }>;
190
+ edges: Array<{
191
+ id: string;
192
+ from: string;
193
+ to: string;
194
+ fromType: ActorType;
195
+ toType: ActorType;
196
+ scope: string;
197
+ status: string;
198
+ edgeType: string;
199
+ }>;
200
+ };
201
+ export type ActionEvaluation = {
202
+ id: string;
203
+ action_request_id: string;
204
+ intent_id: string | null;
205
+ decision: "allowed" | "requires_approval" | "blocked";
206
+ risk_score: number;
207
+ authority_valid: boolean;
208
+ intent_valid: boolean;
209
+ root_intent_valid: boolean;
210
+ reasons: string[];
211
+ created_at: string;
212
+ };
213
+ export type RootIntentChain = {
214
+ valid: boolean;
215
+ root_human_id: string | null;
216
+ root_intent_id: string | null;
217
+ reason: string | null;
218
+ chain: Array<{
219
+ actionId?: string;
220
+ actorId: string;
221
+ actorType: ActorType;
222
+ intentId?: string;
223
+ parentActionId?: string;
224
+ label?: string;
225
+ }>;
226
+ };
110
227
  export type Policy = {
111
228
  id: string;
112
229
  name: string;
@@ -178,6 +295,33 @@ export declare class Auctra {
178
295
  constructor(options: AuctraClientOptions);
179
296
  private request;
180
297
  evaluateAction(input: EvaluateActionInput, options?: RequestOptions): Promise<EvaluateActionResponse>;
298
+ listIntents(): Promise<{
299
+ intents: Intent[];
300
+ }>;
301
+ createIntent(input: CreateIntentInput): Promise<{
302
+ intent: {
303
+ id: string;
304
+ title: string;
305
+ status: string;
306
+ };
307
+ }>;
308
+ getIntent(intentId: string): Promise<{
309
+ intent: IntentDetail;
310
+ }>;
311
+ getAuthorityGraph(): Promise<{
312
+ authority_graph: AuthorityGraph;
313
+ }>;
314
+ createAuthorityEdge(input: CreateAuthorityEdgeInput): Promise<{
315
+ edge: {
316
+ id: string;
317
+ };
318
+ }>;
319
+ getActionEvaluation(actionRequestId: string): Promise<{
320
+ evaluation: ActionEvaluation;
321
+ }>;
322
+ getRootIntentChain(actionRequestId: string): Promise<{
323
+ root_intent_chain: RootIntentChain;
324
+ }>;
181
325
  listAgents(): Promise<{
182
326
  agents: Agent[];
183
327
  }>;
@@ -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;AAEnF,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;CACnC,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,QAAQ,EAAE,QAAQ,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,iBAAiB,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,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EAAE,CAAA;KAAE,CAAC;IAInE,oBAAoB,CAAC,eAAe,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM;YAiB1E,IAAI;kBAAY,MAAM;gBAAU,MAAM;;IAbjD,mBAAmB,CAAC,eAAe,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM;YAazE,IAAI;kBAAY,MAAM;gBAAU,MAAM;;IATjD,qBAAqB,CAAC,eAAe,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM;YAS3E,IAAI;kBAAY,MAAM;gBAAU,MAAM;;YALzC,oBAAoB;IAa5B,YAAY,IAAI,OAAO,CAAC;QAAE,QAAQ,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;IAI/C,YAAY,CAChB,KAAK,EAAE,iBAAiB,GACvB,OAAO,CAAC;QAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,GAAG,MAAM,GAAG,QAAQ,GAAG,YAAY,CAAC,CAAA;KAAE,CAAC;IAiBvE,eAAe,IAAI,OAAO,CAAC;QAAE,YAAY,EAAE,UAAU,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.2.1";
1
+ export const AUCTRA_SDK_VERSION = "0.3.1";
2
2
  export class AuctraApiError extends Error {
3
3
  status;
4
4
  code;
@@ -113,7 +113,65 @@ export class Auctra {
113
113
  }
114
114
  async evaluateAction(input, options = {}) {
115
115
  const idempotencyKey = options.idempotencyKey ?? crypto.randomUUID();
116
- return this.request("POST", "/v1/action-requests/evaluate", { agent_id: input.agentId, action_type: input.actionType, payload: input.payload ?? {} }, { ...options, idempotencyKey });
116
+ return this.request("POST", "/v1/action-requests/evaluate", {
117
+ agent_id: input.agentId,
118
+ action_type: input.actionType,
119
+ payload: input.payload ?? {},
120
+ claimed_intent_id: input.claimedIntentId,
121
+ parent_action_id: input.parentActionId,
122
+ actor: input.actor
123
+ ? {
124
+ id: input.actor.id,
125
+ type: input.actor.type,
126
+ name: input.actor.name,
127
+ }
128
+ : undefined,
129
+ action: input.action
130
+ ? {
131
+ target: input.action.target,
132
+ description: input.action.description,
133
+ risk_level: input.action.riskLevel,
134
+ metadata: input.action.metadata,
135
+ }
136
+ : undefined,
137
+ }, { ...options, idempotencyKey });
138
+ }
139
+ async listIntents() {
140
+ return this.request("GET", "/v1/intents");
141
+ }
142
+ async createIntent(input) {
143
+ return this.request("POST", "/v1/intents", {
144
+ title: input.title,
145
+ description: input.description,
146
+ intent_type: input.intentType,
147
+ risk_level: input.riskLevel,
148
+ max_risk_level: input.maxRiskLevel,
149
+ expires_at: input.expiresAt,
150
+ });
151
+ }
152
+ async getIntent(intentId) {
153
+ return this.request("GET", `/v1/intents/${encodeURIComponent(intentId)}`);
154
+ }
155
+ async getAuthorityGraph() {
156
+ return this.request("GET", "/v1/authority/graph");
157
+ }
158
+ async createAuthorityEdge(input) {
159
+ return this.request("POST", "/v1/authority/edges", {
160
+ from_actor_id: input.fromActorId,
161
+ from_actor_type: input.fromActorType,
162
+ to_actor_id: input.toActorId,
163
+ to_actor_type: input.toActorType,
164
+ authority_scope: input.authorityScope,
165
+ conditions: input.conditions,
166
+ max_risk_level: input.maxRiskLevel,
167
+ expires_at: input.expiresAt,
168
+ });
169
+ }
170
+ async getActionEvaluation(actionRequestId) {
171
+ return this.request("GET", `/v1/action-requests/${encodeURIComponent(actionRequestId)}/evaluation`);
172
+ }
173
+ async getRootIntentChain(actionRequestId) {
174
+ return this.request("GET", `/v1/action-requests/${encodeURIComponent(actionRequestId)}/root-intent`);
117
175
  }
118
176
  async listAgents() {
119
177
  return this.request("GET", "/v1/agents");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@auctra/sdk",
3
- "version": "0.2.1",
3
+ "version": "0.3.1",
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 && npm pack --dry-run",
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,14 +1,29 @@
1
- export const AUCTRA_SDK_VERSION = "0.2.1";
1
+ export const AUCTRA_SDK_VERSION = "0.3.1";
2
2
 
3
3
  export type AgentEnvironment = "dev" | "staging" | "production";
4
4
  export type AuthorityLevel = "low" | "medium" | "high" | "critical";
5
5
  export type Decision = "allowed" | "blocked" | "require_approval";
6
6
  export type PolicyType = "spending" | "data_access" | "communication" | "approval";
7
+ export type ActorType = "human" | "agent" | "service" | "tool";
8
+ export type RiskLevel = "low" | "medium" | "high" | "critical";
7
9
 
8
10
  export type EvaluateActionInput = {
9
11
  agentId: string;
10
12
  actionType: string;
11
13
  payload?: Record<string, unknown>;
14
+ claimedIntentId?: string;
15
+ parentActionId?: string;
16
+ actor?: {
17
+ id?: string;
18
+ type?: ActorType;
19
+ name?: string;
20
+ };
21
+ action?: {
22
+ target?: string;
23
+ description?: string;
24
+ riskLevel?: RiskLevel;
25
+ metadata?: Record<string, unknown>;
26
+ };
12
27
  };
13
28
 
14
29
  export type EvaluateActionResponse = {
@@ -20,6 +35,12 @@ export type EvaluateActionResponse = {
20
35
  sponsor: string;
21
36
  matched_policies: string[];
22
37
  action_request_id: string;
38
+ intelligence?: {
39
+ authority_valid: boolean;
40
+ root_intent_valid: boolean;
41
+ intent_status: string;
42
+ trust_summary?: string;
43
+ };
23
44
  };
24
45
 
25
46
  export type RequestOptions = {
@@ -100,11 +121,106 @@ export type ActionRequest = {
100
121
  risk_score: number;
101
122
  delegation_id: string | null;
102
123
  policy_ids: string[];
124
+ claimed_intent_id: string | null;
125
+ parent_action_id: string | null;
126
+ actor_id: string | null;
127
+ actor_type: ActorType;
128
+ action_target: string | null;
129
+ action_description: string | null;
130
+ action_risk_level: RiskLevel | null;
131
+ action_metadata: Record<string, unknown>;
103
132
  pending_approval_id: string | null;
104
133
  created_at: string;
105
134
  decided_at: string | null;
106
135
  };
107
136
 
137
+ export type Intent = {
138
+ id: string;
139
+ title: string;
140
+ description: string | null;
141
+ intent_type: string | null;
142
+ status: string;
143
+ risk_level: RiskLevel;
144
+ max_risk_level: RiskLevel;
145
+ expires_at: string | null;
146
+ created_at: string;
147
+ owner: { id: string; full_name: string; email: string } | null;
148
+ linked_actions: number;
149
+ };
150
+
151
+ export type IntentDetail = Omit<Intent, "linked_actions"> & {
152
+ linked_actions: Array<{
153
+ action_request_id: string;
154
+ action_type: string;
155
+ summary: string;
156
+ decision: string;
157
+ alignment_status: string;
158
+ alignment_score: number | null;
159
+ }>;
160
+ };
161
+
162
+ export type CreateAuthorityEdgeInput = {
163
+ fromActorId: string;
164
+ fromActorType: ActorType;
165
+ toActorId: string;
166
+ toActorType: ActorType;
167
+ authorityScope: string;
168
+ conditions?: Record<string, unknown>;
169
+ maxRiskLevel?: RiskLevel;
170
+ expiresAt?: string;
171
+ };
172
+
173
+ export type CreateIntentInput = {
174
+ title: string;
175
+ description?: string;
176
+ intentType?: string;
177
+ riskLevel?: RiskLevel;
178
+ maxRiskLevel?: RiskLevel;
179
+ expiresAt?: string;
180
+ };
181
+
182
+ export type AuthorityGraph = {
183
+ nodes: Array<{ id: string; type: ActorType; label: string }>;
184
+ edges: Array<{
185
+ id: string;
186
+ from: string;
187
+ to: string;
188
+ fromType: ActorType;
189
+ toType: ActorType;
190
+ scope: string;
191
+ status: string;
192
+ edgeType: string;
193
+ }>;
194
+ };
195
+
196
+ export type ActionEvaluation = {
197
+ id: string;
198
+ action_request_id: string;
199
+ intent_id: string | null;
200
+ decision: "allowed" | "requires_approval" | "blocked";
201
+ risk_score: number;
202
+ authority_valid: boolean;
203
+ intent_valid: boolean;
204
+ root_intent_valid: boolean;
205
+ reasons: string[];
206
+ created_at: string;
207
+ };
208
+
209
+ export type RootIntentChain = {
210
+ valid: boolean;
211
+ root_human_id: string | null;
212
+ root_intent_id: string | null;
213
+ reason: string | null;
214
+ chain: Array<{
215
+ actionId?: string;
216
+ actorId: string;
217
+ actorType: ActorType;
218
+ intentId?: string;
219
+ parentActionId?: string;
220
+ label?: string;
221
+ }>;
222
+ };
223
+
108
224
  export type Policy = {
109
225
  id: string;
110
226
  name: string;
@@ -302,11 +418,86 @@ export class Auctra {
302
418
  return this.request(
303
419
  "POST",
304
420
  "/v1/action-requests/evaluate",
305
- { agent_id: input.agentId, action_type: input.actionType, payload: input.payload ?? {} },
421
+ {
422
+ agent_id: input.agentId,
423
+ action_type: input.actionType,
424
+ payload: input.payload ?? {},
425
+ claimed_intent_id: input.claimedIntentId,
426
+ parent_action_id: input.parentActionId,
427
+ actor: input.actor
428
+ ? {
429
+ id: input.actor.id,
430
+ type: input.actor.type,
431
+ name: input.actor.name,
432
+ }
433
+ : undefined,
434
+ action: input.action
435
+ ? {
436
+ target: input.action.target,
437
+ description: input.action.description,
438
+ risk_level: input.action.riskLevel,
439
+ metadata: input.action.metadata,
440
+ }
441
+ : undefined,
442
+ },
306
443
  { ...options, idempotencyKey },
307
444
  );
308
445
  }
309
446
 
447
+ async listIntents(): Promise<{ intents: Intent[] }> {
448
+ return this.request("GET", "/v1/intents");
449
+ }
450
+
451
+ async createIntent(
452
+ input: CreateIntentInput,
453
+ ): Promise<{ intent: { id: string; title: string; status: string } }> {
454
+ return this.request("POST", "/v1/intents", {
455
+ title: input.title,
456
+ description: input.description,
457
+ intent_type: input.intentType,
458
+ risk_level: input.riskLevel,
459
+ max_risk_level: input.maxRiskLevel,
460
+ expires_at: input.expiresAt,
461
+ });
462
+ }
463
+
464
+ async getIntent(intentId: string): Promise<{ intent: IntentDetail }> {
465
+ return this.request("GET", `/v1/intents/${encodeURIComponent(intentId)}`);
466
+ }
467
+
468
+ async getAuthorityGraph(): Promise<{ authority_graph: AuthorityGraph }> {
469
+ return this.request("GET", "/v1/authority/graph");
470
+ }
471
+
472
+ async createAuthorityEdge(input: CreateAuthorityEdgeInput): Promise<{ edge: { id: string } }> {
473
+ return this.request("POST", "/v1/authority/edges", {
474
+ from_actor_id: input.fromActorId,
475
+ from_actor_type: input.fromActorType,
476
+ to_actor_id: input.toActorId,
477
+ to_actor_type: input.toActorType,
478
+ authority_scope: input.authorityScope,
479
+ conditions: input.conditions,
480
+ max_risk_level: input.maxRiskLevel,
481
+ expires_at: input.expiresAt,
482
+ });
483
+ }
484
+
485
+ async getActionEvaluation(actionRequestId: string): Promise<{ evaluation: ActionEvaluation }> {
486
+ return this.request(
487
+ "GET",
488
+ `/v1/action-requests/${encodeURIComponent(actionRequestId)}/evaluation`,
489
+ );
490
+ }
491
+
492
+ async getRootIntentChain(
493
+ actionRequestId: string,
494
+ ): Promise<{ root_intent_chain: RootIntentChain }> {
495
+ return this.request(
496
+ "GET",
497
+ `/v1/action-requests/${encodeURIComponent(actionRequestId)}/root-intent`,
498
+ );
499
+ }
500
+
310
501
  async listAgents(): Promise<{ agents: Agent[] }> {
311
502
  return this.request("GET", "/v1/agents");
312
503
  }