@oxdeai/sdk 1.3.1 → 1.3.3

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/src/types.ts DELETED
@@ -1,70 +0,0 @@
1
- import type { Authorization, Intent, State, VerificationResult } from "@oxdeai/core";
2
-
3
- export type MaybePromise<T> = T | Promise<T>;
4
-
5
- export type EvaluateDecision =
6
- | { decision: "ALLOW"; reasons: []; authorization: Authorization }
7
- | { decision: "DENY"; reasons: string[] };
8
-
9
- export type EvaluateAndCommitResult = {
10
- output: EvaluateDecision;
11
- state: State;
12
- auditEvents: unknown[];
13
- };
14
-
15
- export type VerifyBundleResult = {
16
- snapshot: VerificationResult;
17
- audit: VerificationResult;
18
- envelope: VerificationResult;
19
- };
20
-
21
- export interface StateAdapter {
22
- load(): MaybePromise<State>;
23
- save(state: State): MaybePromise<void>;
24
- }
25
-
26
- export interface AuditAdapter {
27
- append(events: readonly unknown[]): MaybePromise<void>;
28
- }
29
-
30
- export interface ClockAdapter {
31
- now(): number;
32
- }
33
-
34
- export type IntentBuilderInput = {
35
- intent_id: string;
36
- agent_id: string;
37
- action_type: Intent["action_type"];
38
- amount: bigint;
39
- target: string;
40
- nonce: bigint;
41
- timestamp?: number;
42
- type?: "EXECUTE" | "RELEASE";
43
- authorization_id?: string;
44
- asset?: string;
45
- metadata_hash?: string;
46
- signature?: string;
47
- depth?: number;
48
- tool?: string;
49
- tool_call?: boolean;
50
- };
51
-
52
- export type StateBuilderInput = {
53
- policy_version?: string;
54
- period_id?: string;
55
- agent_id: string;
56
- allow_action_types?: Intent["action_type"][];
57
- allow_assets?: string[];
58
- allow_targets?: string[];
59
- budget_limit?: bigint;
60
- spent_in_period?: bigint;
61
- max_amount_per_action?: bigint;
62
- velocity_window_seconds?: number;
63
- velocity_max_actions?: number;
64
- replay_window_seconds?: number;
65
- replay_max_nonces_per_agent?: number;
66
- max_concurrent?: number;
67
- max_depth?: number;
68
- tool_window_seconds?: number;
69
- tool_max_calls?: number;
70
- };
package/tsconfig.json DELETED
@@ -1,9 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.base.json",
3
- "compilerOptions": {
4
- "outDir": "dist",
5
- "rootDir": "src",
6
- "types": ["node"]
7
- },
8
- "include": ["src"]
9
- }