interai-risk-oracle 0.1.2-beta
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/LICENSE +11 -0
- package/README.md +55 -0
- package/dist/index.d.ts +102 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +66 -0
- package/dist/index.js.map +1 -0
- package/package.json +51 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
InterAI Public Interface License Notice
|
|
2
|
+
|
|
3
|
+
Copyright (c) InterAILabs.
|
|
4
|
+
|
|
5
|
+
This package contains client code for integrating with the hosted InterAI Risk
|
|
6
|
+
Oracle API. It may be used, copied, modified, and distributed for that purpose,
|
|
7
|
+
provided that this notice is retained. The hosted service internals,
|
|
8
|
+
verification logic, scoring logic, trademarks, and trust intelligence remain
|
|
9
|
+
proprietary unless a separate written license says otherwise.
|
|
10
|
+
|
|
11
|
+
This package is provided "as is", without warranties or conditions of any kind.
|
package/README.md
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# TypeScript SDK
|
|
2
|
+
|
|
3
|
+
Typed hosted API client for InterAI Risk Oracle. The package source is
|
|
4
|
+
publish-ready; confirm the package has been released before using the registry
|
|
5
|
+
command below.
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install interai-risk-oracle
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
import { InterAIRiskOracleClient } from "interai-risk-oracle"
|
|
13
|
+
|
|
14
|
+
const client = new InterAIRiskOracleClient({
|
|
15
|
+
baseUrl: "https://ai-risk-oracle.fly.dev",
|
|
16
|
+
apiKey: process.env.INTERAI_API_KEY
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
const decision = await client.verify({
|
|
20
|
+
use_case: "agent-before-tool-execution",
|
|
21
|
+
action: {
|
|
22
|
+
type: "tool_call",
|
|
23
|
+
description: "Send account notice",
|
|
24
|
+
external_side_effect: true
|
|
25
|
+
},
|
|
26
|
+
context: {
|
|
27
|
+
agent_id: "agent_123",
|
|
28
|
+
environment: "production",
|
|
29
|
+
user_confirmation: false
|
|
30
|
+
},
|
|
31
|
+
policy: {
|
|
32
|
+
max_risk_level: "medium",
|
|
33
|
+
require_trust_receipt: true,
|
|
34
|
+
require_human_review_above: 0.75
|
|
35
|
+
}
|
|
36
|
+
}, "stable-business-operation-id")
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
`verify` generates an idempotency key when one is not provided. Supply a stable
|
|
40
|
+
business-operation key when retries must resolve to the same billed result.
|
|
41
|
+
|
|
42
|
+
For a portable signature check, fetch a lookup and forward its opaque signed
|
|
43
|
+
payload without parsing it:
|
|
44
|
+
|
|
45
|
+
```ts
|
|
46
|
+
const receipt = await client.getTrustReceipt(decision.trust_receipt_id!)
|
|
47
|
+
const signatureCheck = await client.verifyTrustReceiptSignature(receipt)
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Build and inspect the package locally:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
npm run build
|
|
54
|
+
npm pack --dry-run
|
|
55
|
+
```
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
export type AutonomousRiskLevel = "low" | "medium" | "high";
|
|
2
|
+
export type GatewayDecision = "allow" | "review_required" | "block";
|
|
3
|
+
export type VerifyRequest = {
|
|
4
|
+
use_case: string;
|
|
5
|
+
action: {
|
|
6
|
+
type: string;
|
|
7
|
+
name?: string;
|
|
8
|
+
description: string;
|
|
9
|
+
amount_usd?: number;
|
|
10
|
+
currency?: string;
|
|
11
|
+
irreversible?: boolean;
|
|
12
|
+
external_side_effect?: boolean;
|
|
13
|
+
[key: string]: unknown;
|
|
14
|
+
};
|
|
15
|
+
context?: {
|
|
16
|
+
agent_id?: string;
|
|
17
|
+
environment?: string;
|
|
18
|
+
counterparty_id?: string;
|
|
19
|
+
user_confirmation?: boolean;
|
|
20
|
+
[key: string]: unknown;
|
|
21
|
+
};
|
|
22
|
+
policy?: {
|
|
23
|
+
max_risk_level?: AutonomousRiskLevel;
|
|
24
|
+
require_trust_receipt?: boolean;
|
|
25
|
+
amount_usd_limit?: number;
|
|
26
|
+
blocked_action_types?: string[];
|
|
27
|
+
allowed_action_types?: string[];
|
|
28
|
+
require_human_review_above?: number;
|
|
29
|
+
require_user_confirmation_for_irreversible?: boolean;
|
|
30
|
+
[key: string]: unknown;
|
|
31
|
+
};
|
|
32
|
+
domain?: string;
|
|
33
|
+
mode?: "fast_heuristic" | "semantic_judge";
|
|
34
|
+
};
|
|
35
|
+
export type PolicyViolation = {
|
|
36
|
+
code: string;
|
|
37
|
+
message: string;
|
|
38
|
+
severity: GatewayDecision;
|
|
39
|
+
};
|
|
40
|
+
export type VerifySignals = {
|
|
41
|
+
semantic_relevance?: number;
|
|
42
|
+
contradiction_risk?: number;
|
|
43
|
+
unsupported_specificity?: number;
|
|
44
|
+
numeric_consistency?: number;
|
|
45
|
+
overconfidence?: number;
|
|
46
|
+
has_external_side_effect?: boolean | null;
|
|
47
|
+
is_irreversible?: boolean | null;
|
|
48
|
+
involves_money?: boolean;
|
|
49
|
+
amount_usd?: number | null;
|
|
50
|
+
requires_user_confirmation?: boolean;
|
|
51
|
+
has_counterparty?: boolean;
|
|
52
|
+
environment?: string;
|
|
53
|
+
action_type?: string | null;
|
|
54
|
+
unknown_critical_fields?: string[];
|
|
55
|
+
autonomous_execution_detected?: boolean;
|
|
56
|
+
[key: string]: unknown;
|
|
57
|
+
};
|
|
58
|
+
export type VerifyResponse = {
|
|
59
|
+
decision_id: string;
|
|
60
|
+
request_contract: "autonomous_execution";
|
|
61
|
+
score: number;
|
|
62
|
+
risk_level: AutonomousRiskLevel;
|
|
63
|
+
signals: VerifySignals;
|
|
64
|
+
recommended_action: GatewayDecision;
|
|
65
|
+
policy_result: GatewayDecision;
|
|
66
|
+
policy_violations: PolicyViolation[];
|
|
67
|
+
trust_receipt_id?: string;
|
|
68
|
+
trust_receipt?: Record<string, unknown>;
|
|
69
|
+
[key: string]: unknown;
|
|
70
|
+
};
|
|
71
|
+
export type InterAIClientOptions = {
|
|
72
|
+
baseUrl: string;
|
|
73
|
+
apiKey?: string;
|
|
74
|
+
clientName?: string;
|
|
75
|
+
};
|
|
76
|
+
export type TrustReceiptLookup = {
|
|
77
|
+
ok: true;
|
|
78
|
+
receipt: Record<string, unknown> & {
|
|
79
|
+
receipt_id: string;
|
|
80
|
+
};
|
|
81
|
+
verification: {
|
|
82
|
+
signed: boolean;
|
|
83
|
+
signature: string | null;
|
|
84
|
+
signature_alg: "hmac-sha256" | null;
|
|
85
|
+
signed_payload: string | null;
|
|
86
|
+
};
|
|
87
|
+
[key: string]: unknown;
|
|
88
|
+
};
|
|
89
|
+
export declare class InterAIRiskOracleClient {
|
|
90
|
+
readonly baseUrl: string;
|
|
91
|
+
readonly apiKey?: string;
|
|
92
|
+
readonly clientName: string;
|
|
93
|
+
constructor(options: InterAIClientOptions);
|
|
94
|
+
private jsonRequest;
|
|
95
|
+
verify(request: VerifyRequest, idempotencyKey?: string): Promise<VerifyResponse>;
|
|
96
|
+
getTrustReceipt(receiptId: string): Promise<TrustReceiptLookup>;
|
|
97
|
+
verifyTrustReceiptSignature(lookup: TrustReceiptLookup): Promise<{
|
|
98
|
+
valid: boolean;
|
|
99
|
+
signature_alg: "hmac-sha256";
|
|
100
|
+
}>;
|
|
101
|
+
}
|
|
102
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mBAAmB,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAA;AAC3D,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,iBAAiB,GAAG,OAAO,CAAA;AAEnE,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE;QACN,IAAI,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AG;IAC/B,EAAE,EAAE,IAAI,CAAA;IACR,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAA;IACzD,YAAY,EAAE;QACZ,MAAM,EAAE,OAAO,CAAA;QACf,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;QACxB,aAAa,EAAE,aAAa,GAAG,IAAI,CAAA;QACnC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;KAC9B,CAAA;IACD,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACvB,CAAA;AAOD,qBAAa,uBAAuB;IAClC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;gBAEf,OAAO,EAAE,oBAAoB;YAM3B,WAAW;IAsBnB,MAAM,CACV,OAAO,EAAE,aAAa,EACtB,cAAc,SAA0B,GACvC,OAAO,CAAC,cAAc,CAAC;IAWpB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAM/D,2BAA2B,CAC/B,MAAM,EAAE,kBAAkB,GACzB,OAAO,CAAC;QAAE,KAAK,EAAE,OAAO,CAAC;QAAC,aAAa,EAAE,aAAa,CAAA;KAAE,CAAC;CAgB7D"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
function defaultIdempotencyKey() {
|
|
2
|
+
const random = globalThis.crypto?.randomUUID?.();
|
|
3
|
+
return random || `interai-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 12)}`;
|
|
4
|
+
}
|
|
5
|
+
export class InterAIRiskOracleClient {
|
|
6
|
+
baseUrl;
|
|
7
|
+
apiKey;
|
|
8
|
+
clientName;
|
|
9
|
+
constructor(options) {
|
|
10
|
+
this.baseUrl = options.baseUrl.replace(/\/$/, "");
|
|
11
|
+
this.apiKey = options.apiKey;
|
|
12
|
+
this.clientName = options.clientName || "typescript-sdk/0.1.2-beta";
|
|
13
|
+
}
|
|
14
|
+
async jsonRequest(path, init) {
|
|
15
|
+
const response = await fetch(`${this.baseUrl}${path}`, {
|
|
16
|
+
...init,
|
|
17
|
+
headers: {
|
|
18
|
+
...(this.apiKey ? { authorization: `Bearer ${this.apiKey}` } : {}),
|
|
19
|
+
"x-interai-client": this.clientName,
|
|
20
|
+
...(init?.headers || {})
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
const text = await response.text();
|
|
24
|
+
let body;
|
|
25
|
+
try {
|
|
26
|
+
body = text ? JSON.parse(text) : null;
|
|
27
|
+
}
|
|
28
|
+
catch {
|
|
29
|
+
body = { error: "invalid_json_response", raw: text.slice(0, 500) };
|
|
30
|
+
}
|
|
31
|
+
if (!response.ok) {
|
|
32
|
+
throw new Error(`InterAI request failed: ${response.status} ${JSON.stringify(body)}`);
|
|
33
|
+
}
|
|
34
|
+
return body;
|
|
35
|
+
}
|
|
36
|
+
async verify(request, idempotencyKey = defaultIdempotencyKey()) {
|
|
37
|
+
return this.jsonRequest("/verify", {
|
|
38
|
+
method: "POST",
|
|
39
|
+
headers: {
|
|
40
|
+
"content-type": "application/json",
|
|
41
|
+
"x-idempotency-key": idempotencyKey
|
|
42
|
+
},
|
|
43
|
+
body: JSON.stringify(request)
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
async getTrustReceipt(receiptId) {
|
|
47
|
+
return this.jsonRequest(`/trust/receipts/${encodeURIComponent(receiptId)}`);
|
|
48
|
+
}
|
|
49
|
+
async verifyTrustReceiptSignature(lookup) {
|
|
50
|
+
const { receipt, verification } = lookup;
|
|
51
|
+
if (!verification.signature || !verification.signed_payload) {
|
|
52
|
+
throw new Error("Trust receipt is not signed");
|
|
53
|
+
}
|
|
54
|
+
return this.jsonRequest("/trust/verify-signature", {
|
|
55
|
+
method: "POST",
|
|
56
|
+
headers: { "content-type": "application/json" },
|
|
57
|
+
body: JSON.stringify({
|
|
58
|
+
receipt_id: receipt.receipt_id,
|
|
59
|
+
signed_payload: verification.signed_payload,
|
|
60
|
+
signature: verification.signature,
|
|
61
|
+
signature_alg: verification.signature_alg
|
|
62
|
+
})
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AA6FA,SAAS,qBAAqB;IAC5B,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE,CAAA;IAChD,OAAO,MAAM,IAAI,WAAW,IAAI,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAA;AAClG,CAAC;AAED,MAAM,OAAO,uBAAuB;IACzB,OAAO,CAAQ;IACf,MAAM,CAAS;IACf,UAAU,CAAQ;IAE3B,YAAY,OAA6B;QACvC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAA;QACjD,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAA;QAC5B,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,2BAA2B,CAAA;IACrE,CAAC;IAEO,KAAK,CAAC,WAAW,CAAC,IAAY,EAAE,IAAkB;QACxD,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,IAAI,CAAC,OAAO,GAAG,IAAI,EAAE,EAAE;YACrD,GAAG,IAAI;YACP,OAAO,EAAE;gBACP,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,UAAU,IAAI,CAA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;QAE1B,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,GAAG,MAAM,CAAA;QACxC,IAAI,CAAC,YAAY,CAAC,SAAS,IAAI,CAAC,YAAY,CAAC,cAAc,EAAE,CAAC;YAC5D,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAA;QAChD,CAAC;QACD,OAAO,IAAI,CAAC,WAAW,CAAC,yBAAyB,EAAE;YACjD,MAAM,EAAE,MAAM;YACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;YAC/C,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;gBACnB,UAAU,EAAE,OAAO,CAAC,UAAU;gBAC9B,cAAc,EAAE,YAAY,CAAC,cAAc;gBAC3C,SAAS,EAAE,YAAY,CAAC,SAAS;gBACjC,aAAa,EAAE,YAAY,CAAC,aAAa;aAC1C,CAAC;SACH,CAA8D,CAAA;IACjE,CAAC;CACF"}
|
package/package.json
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "interai-risk-oracle",
|
|
3
|
+
"version": "0.1.2-beta",
|
|
4
|
+
"description": "TypeScript client and policy-gate helpers for the hosted InterAI Risk Oracle API.",
|
|
5
|
+
"homepage": "https://ai-risk-oracle.fly.dev/",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/InterAILabs/ai-risk-oracle.git",
|
|
9
|
+
"directory": "sdk/typescript"
|
|
10
|
+
},
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/InterAILabs/ai-risk-oracle/issues"
|
|
13
|
+
},
|
|
14
|
+
"type": "module",
|
|
15
|
+
"main": "./dist/index.js",
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"exports": {
|
|
18
|
+
".": {
|
|
19
|
+
"types": "./dist/index.d.ts",
|
|
20
|
+
"import": "./dist/index.js"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"files": [
|
|
24
|
+
"dist",
|
|
25
|
+
"README.md",
|
|
26
|
+
"LICENSE"
|
|
27
|
+
],
|
|
28
|
+
"scripts": {
|
|
29
|
+
"build": "tsc -p tsconfig.json",
|
|
30
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
31
|
+
"prepack": "npm run build"
|
|
32
|
+
},
|
|
33
|
+
"sideEffects": false,
|
|
34
|
+
"engines": {
|
|
35
|
+
"node": ">=20"
|
|
36
|
+
},
|
|
37
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
38
|
+
"publishConfig": {
|
|
39
|
+
"access": "public"
|
|
40
|
+
},
|
|
41
|
+
"keywords": [
|
|
42
|
+
"interai",
|
|
43
|
+
"risk-oracle",
|
|
44
|
+
"autonomous-agents",
|
|
45
|
+
"trust-receipts",
|
|
46
|
+
"policy-enforcement"
|
|
47
|
+
],
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"typescript": "^5.0.0"
|
|
50
|
+
}
|
|
51
|
+
}
|