@valiron/sdk 0.1.1 → 0.2.0
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/README.md +140 -321
- package/dist/clients.d.ts +25 -72
- package/dist/clients.d.ts.map +1 -1
- package/dist/clients.js +65 -121
- package/dist/clients.js.map +1 -1
- package/dist/index.d.ts +52 -83
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +58 -85
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +105 -73
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +4 -2
- package/dist/types.js.map +1 -1
- package/package.json +8 -9
package/dist/index.js
CHANGED
|
@@ -14,145 +14,118 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.ValironSDK = void 0;
|
|
17
|
+
exports.ValironClient = exports.ValironSDK = void 0;
|
|
18
18
|
const clients_1 = require("./clients");
|
|
19
19
|
/**
|
|
20
|
-
* Valiron SDK
|
|
20
|
+
* Valiron SDK – Official TypeScript SDK for the Trust Layer for Agentic Economy
|
|
21
21
|
*
|
|
22
22
|
* @example
|
|
23
23
|
* ```typescript
|
|
24
24
|
* import { ValironSDK } from '@valiron/sdk';
|
|
25
25
|
*
|
|
26
|
-
* const valiron = new ValironSDK(
|
|
27
|
-
* apiKey: 'vln_your_api_key'
|
|
28
|
-
* });
|
|
26
|
+
* const valiron = new ValironSDK();
|
|
29
27
|
*
|
|
30
|
-
* //
|
|
31
|
-
* const
|
|
32
|
-
*
|
|
28
|
+
* // Get full trust profile (identity + reputation + routing)
|
|
29
|
+
* const profile = await valiron.getAgentProfile('25459');
|
|
30
|
+
*
|
|
31
|
+
* if (profile.routing.finalRoute === 'prod') {
|
|
33
32
|
* // Allow full production access
|
|
34
33
|
* }
|
|
35
34
|
* ```
|
|
36
35
|
*/
|
|
37
36
|
class ValironSDK {
|
|
38
|
-
constructor(config) {
|
|
39
|
-
this.
|
|
40
|
-
this.reputationClient = new clients_1.ReputationClient(config);
|
|
37
|
+
constructor(config = {}) {
|
|
38
|
+
this.client = new clients_1.ValironClient(config);
|
|
41
39
|
}
|
|
42
40
|
/**
|
|
43
|
-
*
|
|
41
|
+
* Get the complete trust profile for an ERC-8004 agent.
|
|
44
42
|
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
43
|
+
* Returns on-chain identity, on-chain reputation (feedback count,
|
|
44
|
+
* average score, individual entries), local behavioral reputation
|
|
45
|
+
* (Valiron sandbox metrics), and a hybrid routing decision.
|
|
47
46
|
*
|
|
48
47
|
* @param agentId - The ERC-8004 agent ID
|
|
49
|
-
* @returns
|
|
48
|
+
* @returns Full agent trust profile
|
|
50
49
|
*
|
|
51
50
|
* @example
|
|
52
51
|
* ```typescript
|
|
53
|
-
* const
|
|
52
|
+
* const profile = await valiron.getAgentProfile('25459');
|
|
54
53
|
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
* return handleThrottledRequest();
|
|
60
|
-
* case 'sandbox':
|
|
61
|
-
* case 'sandbox_only':
|
|
62
|
-
* return rejectRequest();
|
|
63
|
-
* }
|
|
54
|
+
* console.log(profile.routing.finalRoute); // 'prod'
|
|
55
|
+
* console.log(profile.routing.decision); // human-readable explanation
|
|
56
|
+
* console.log(profile.localReputation?.tier); // 'AAA'
|
|
57
|
+
* console.log(profile.onchainReputation.averageScore); // 92.5
|
|
64
58
|
* ```
|
|
65
59
|
*/
|
|
66
|
-
async
|
|
67
|
-
return this.
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Check wallet routing decision
|
|
71
|
-
*
|
|
72
|
-
* Legacy method for wallet-based routing. Prefer `checkAgent()` for ERC-8004 agents.
|
|
73
|
-
*
|
|
74
|
-
* @param wallet - The wallet address
|
|
75
|
-
* @returns Routing decision
|
|
76
|
-
*/
|
|
77
|
-
async checkWallet(wallet) {
|
|
78
|
-
return this.trustClient.checkWallet(wallet);
|
|
60
|
+
async getAgentProfile(agentId) {
|
|
61
|
+
return this.client.getAgentProfile(agentId);
|
|
79
62
|
}
|
|
80
63
|
/**
|
|
81
|
-
*
|
|
64
|
+
* Convenience helper – get just the routing decision for an agent.
|
|
82
65
|
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
66
|
+
* This calls `getAgentProfile` under the hood and extracts the
|
|
67
|
+
* `routing.finalRoute` field.
|
|
85
68
|
*
|
|
86
69
|
* @param agentId - The ERC-8004 agent ID
|
|
87
|
-
* @returns
|
|
70
|
+
* @returns The route decision string
|
|
88
71
|
*
|
|
89
72
|
* @example
|
|
90
73
|
* ```typescript
|
|
91
|
-
* const
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
*
|
|
74
|
+
* const route = await valiron.checkAgent('25459');
|
|
75
|
+
* if (route === 'prod' || route === 'prod_throttled') {
|
|
76
|
+
* return handleRequest();
|
|
77
|
+
* }
|
|
95
78
|
* ```
|
|
96
79
|
*/
|
|
97
|
-
async
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* Get wallet profile
|
|
102
|
-
*
|
|
103
|
-
* @param wallet - The wallet address
|
|
104
|
-
* @returns Wallet profile with routing info
|
|
105
|
-
*/
|
|
106
|
-
async getWalletProfile(wallet) {
|
|
107
|
-
return this.trustClient.getWalletProfile(wallet);
|
|
80
|
+
async checkAgent(agentId) {
|
|
81
|
+
const profile = await this.client.getAgentProfile(agentId);
|
|
82
|
+
return profile.routing.finalRoute;
|
|
108
83
|
}
|
|
109
84
|
/**
|
|
110
|
-
*
|
|
85
|
+
* Get a trust profile by wallet address (reverse lookup).
|
|
111
86
|
*
|
|
112
|
-
*
|
|
113
|
-
*
|
|
87
|
+
* If the wallet has an associated agent ID in local state, the full
|
|
88
|
+
* profile (identity + on-chain reputation) is included. Otherwise
|
|
89
|
+
* only local behavioral data is returned.
|
|
114
90
|
*
|
|
115
|
-
* @param
|
|
116
|
-
* @returns
|
|
91
|
+
* @param wallet - Ethereum wallet address
|
|
92
|
+
* @returns Wallet trust profile
|
|
117
93
|
*
|
|
118
94
|
* @example
|
|
119
95
|
* ```typescript
|
|
120
|
-
* await valiron.
|
|
121
|
-
*
|
|
122
|
-
* score: 95,
|
|
123
|
-
* outcome: 'success',
|
|
124
|
-
* metadata: {
|
|
125
|
-
* taskType: 'data_processing',
|
|
126
|
-
* duration: 1234
|
|
127
|
-
* }
|
|
128
|
-
* });
|
|
96
|
+
* const profile = await valiron.getWalletProfile('0x52ce…');
|
|
97
|
+
* console.log(profile.routing.finalRoute);
|
|
129
98
|
* ```
|
|
130
99
|
*/
|
|
131
|
-
async
|
|
132
|
-
return this.
|
|
100
|
+
async getWalletProfile(wallet) {
|
|
101
|
+
return this.client.getWalletProfile(wallet);
|
|
133
102
|
}
|
|
134
103
|
/**
|
|
135
|
-
*
|
|
104
|
+
* Trigger real sandbox testing for an agent.
|
|
136
105
|
*
|
|
137
|
-
*
|
|
106
|
+
* Sends a series of test requests against the agent's HTTP endpoint
|
|
107
|
+
* (if registered on-chain) or through the sandbox relay, then computes
|
|
108
|
+
* a Valiron behavioral score and stores the result.
|
|
138
109
|
*
|
|
139
|
-
* @param
|
|
140
|
-
* @returns
|
|
110
|
+
* @param agentId - The ERC-8004 agent ID
|
|
111
|
+
* @returns Sandbox test results including score, tier, and metrics
|
|
141
112
|
*
|
|
142
113
|
* @example
|
|
143
114
|
* ```typescript
|
|
144
|
-
* await valiron.triggerSandboxTest(
|
|
145
|
-
*
|
|
146
|
-
*
|
|
147
|
-
*
|
|
115
|
+
* const result = await valiron.triggerSandboxTest('25459');
|
|
116
|
+
* console.log(result.valironScore); // 95
|
|
117
|
+
* console.log(result.tier); // 'AAA'
|
|
118
|
+
* console.log(result.riskLevel); // 'GREEN'
|
|
119
|
+
* console.log(result.testSummary); // { totalRequests, successCount, … }
|
|
148
120
|
* ```
|
|
149
121
|
*/
|
|
150
|
-
async triggerSandboxTest(
|
|
151
|
-
return this.
|
|
122
|
+
async triggerSandboxTest(agentId) {
|
|
123
|
+
return this.client.triggerSandboxTest(agentId);
|
|
152
124
|
}
|
|
153
125
|
}
|
|
154
126
|
exports.ValironSDK = ValironSDK;
|
|
155
|
-
//
|
|
127
|
+
// Re-export everything
|
|
156
128
|
__exportStar(require("./types"), exports);
|
|
157
|
-
|
|
129
|
+
var clients_2 = require("./clients");
|
|
130
|
+
Object.defineProperty(exports, "ValironClient", { enumerable: true, get: function () { return clients_2.ValironClient; } });
|
|
158
131
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,uCAA0C;AAS1C;;;;;;;;;;;;;;;;GAgBG;AACH,MAAa,UAAU;IAGrB,YAAY,SAAwB,EAAE;QACpC,IAAI,CAAC,MAAM,GAAG,IAAI,uBAAa,CAAC,MAAM,CAAC,CAAC;IAC1C,CAAC;IAED;;;;;;;;;;;;;;;;;;;OAmBG;IACH,KAAK,CAAC,eAAe,CAAC,OAAe;QACnC,OAAO,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;IAC9C,CAAC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,KAAK,CAAC,UAAU,CAAC,OAAe;QAC9B,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;QAC3D,OAAO,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC;IACpC,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,KAAK,CAAC,gBAAgB,CAAC,MAAc;QACnC,OAAO,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC;IAC9C,CAAC;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACH,KAAK,CAAC,kBAAkB,CAAC,OAAe;QACtC,OAAO,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC;IACjD,CAAC;CACF;AA/FD,gCA+FC;AAED,uBAAuB;AACvB,0CAAwB;AACxB,qCAA0C;AAAjC,wGAAA,aAAa,OAAA"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,25 +1,44 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Valiron SDK Types
|
|
3
3
|
*
|
|
4
|
-
* Type definitions for the Valiron
|
|
4
|
+
* Type definitions for the Valiron Operator API
|
|
5
|
+
* Matches the actual edge-proxy /operator/* endpoints
|
|
5
6
|
*/
|
|
6
|
-
export type RouteDecision =
|
|
7
|
-
export type RiskLevel =
|
|
8
|
-
export type MoodysRating =
|
|
9
|
-
export interface
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
export type RouteDecision = "prod" | "prod_throttled" | "sandbox" | "sandbox_only";
|
|
8
|
+
export type RiskLevel = "GREEN" | "YELLOW" | "RED";
|
|
9
|
+
export type MoodysRating = "AAA" | "AA" | "A" | "BAA" | "BA" | "B" | "CAA" | "CA" | "C";
|
|
10
|
+
export interface AgentIdentity {
|
|
11
|
+
agentId: string;
|
|
12
|
+
wallet: string;
|
|
13
|
+
tokenUri: string;
|
|
14
|
+
name: string;
|
|
15
|
+
image: string;
|
|
16
|
+
description: string;
|
|
17
|
+
/** ERC-8004 endpoints, e.g. { agentWallet: "eip155:1:0x…", api: "https://…" } */
|
|
18
|
+
endpoints: Record<string, string>;
|
|
19
|
+
trustModels: string[];
|
|
20
|
+
/** Any additional metadata from the Agent Registration File */
|
|
21
|
+
[key: string]: unknown;
|
|
14
22
|
}
|
|
15
|
-
export interface
|
|
23
|
+
export interface FeedbackEntry {
|
|
24
|
+
from: string;
|
|
16
25
|
score: number;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
26
|
+
tag1: string;
|
|
27
|
+
tag2: string;
|
|
28
|
+
uri: string;
|
|
29
|
+
hash: string;
|
|
30
|
+
blockNumber: string;
|
|
31
|
+
transactionHash: string;
|
|
32
|
+
feedbackIndex?: string;
|
|
33
|
+
indexedTag1?: string;
|
|
34
|
+
endpoint?: string;
|
|
35
|
+
}
|
|
36
|
+
export interface OnchainReputation {
|
|
37
|
+
count: string;
|
|
38
|
+
averageScore: number;
|
|
39
|
+
feedbackEntries: FeedbackEntry[];
|
|
40
|
+
totalFeedback: number;
|
|
41
|
+
error?: string;
|
|
23
42
|
}
|
|
24
43
|
export interface BehavioralMetrics {
|
|
25
44
|
loops?: number;
|
|
@@ -28,63 +47,86 @@ export interface BehavioralMetrics {
|
|
|
28
47
|
errorRate?: number;
|
|
29
48
|
averageLatency?: number;
|
|
30
49
|
burstiness?: number;
|
|
50
|
+
onChainFeedbackCount?: number;
|
|
51
|
+
onChainAverageScore?: number;
|
|
31
52
|
}
|
|
32
|
-
export interface
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
53
|
+
export interface LocalReputation {
|
|
54
|
+
exists: boolean;
|
|
55
|
+
score?: number;
|
|
56
|
+
tier?: MoodysRating | string;
|
|
57
|
+
riskLevel?: RiskLevel | string;
|
|
58
|
+
graduated?: boolean;
|
|
59
|
+
metrics?: BehavioralMetrics;
|
|
60
|
+
ipfsCid?: string | null;
|
|
61
|
+
agentId?: string | null;
|
|
62
|
+
lastUpdated?: string | null;
|
|
63
|
+
message?: string;
|
|
64
|
+
error?: string;
|
|
38
65
|
}
|
|
39
|
-
export interface
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
66
|
+
export interface RoutingSignals {
|
|
67
|
+
onchain: {
|
|
68
|
+
feedbackCount: number;
|
|
69
|
+
averageScore: number;
|
|
70
|
+
threshold: string;
|
|
71
|
+
};
|
|
72
|
+
local: {
|
|
73
|
+
exists: boolean;
|
|
74
|
+
graduated: boolean;
|
|
75
|
+
tier: string;
|
|
76
|
+
riskLevel: string;
|
|
77
|
+
score: number;
|
|
78
|
+
};
|
|
47
79
|
}
|
|
48
|
-
export interface
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
tag2?: string;
|
|
54
|
-
endpoint?: string;
|
|
55
|
-
feedbackURI?: string;
|
|
56
|
-
feedbackHash?: string;
|
|
57
|
-
revoked?: boolean;
|
|
58
|
-
response?: string;
|
|
80
|
+
export interface RoutingExplanation {
|
|
81
|
+
finalRoute: RouteDecision;
|
|
82
|
+
decision: string;
|
|
83
|
+
reasons: string[];
|
|
84
|
+
signals: RoutingSignals;
|
|
59
85
|
}
|
|
86
|
+
/**
|
|
87
|
+
* Response from `GET /operator/agent/:agentId`
|
|
88
|
+
*/
|
|
60
89
|
export interface AgentProfile {
|
|
61
90
|
agentId: string;
|
|
62
91
|
identity: AgentIdentity;
|
|
63
|
-
onchainReputation:
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
};
|
|
68
|
-
localReputation?: LocalReputation;
|
|
69
|
-
routing: {
|
|
70
|
-
finalRoute: RouteDecision;
|
|
71
|
-
decision: string;
|
|
72
|
-
reasons: string[];
|
|
73
|
-
signals: {
|
|
74
|
-
onChainQualifies: boolean;
|
|
75
|
-
hasLocalReputation: boolean;
|
|
76
|
-
localRiskLevel?: RiskLevel;
|
|
77
|
-
};
|
|
78
|
-
};
|
|
92
|
+
onchainReputation: OnchainReputation;
|
|
93
|
+
localReputation: LocalReputation | null;
|
|
94
|
+
routing: RoutingExplanation;
|
|
95
|
+
timestamp: string;
|
|
79
96
|
}
|
|
97
|
+
/**
|
|
98
|
+
* Response from `GET /operator/wallet/:wallet`
|
|
99
|
+
*/
|
|
80
100
|
export interface WalletProfile {
|
|
81
101
|
wallet: string;
|
|
82
|
-
agentId
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
102
|
+
agentId: string | null;
|
|
103
|
+
identity: AgentIdentity | null;
|
|
104
|
+
onchainReputation: OnchainReputation | null;
|
|
105
|
+
localReputation: LocalReputation | null;
|
|
106
|
+
routing: RoutingExplanation;
|
|
107
|
+
timestamp: string;
|
|
108
|
+
}
|
|
109
|
+
export interface SandboxTestSummary {
|
|
110
|
+
totalRequests: number;
|
|
111
|
+
successCount: number;
|
|
112
|
+
rateLimitCount: number;
|
|
113
|
+
errorCount: number;
|
|
114
|
+
avgLatencyMs: number;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Response from `POST /operator/trigger-sandbox/:agentId`
|
|
118
|
+
*/
|
|
119
|
+
export interface SandboxResult {
|
|
120
|
+
ok: boolean;
|
|
121
|
+
agentId: string;
|
|
122
|
+
wallet: string;
|
|
123
|
+
mode: "endpoint-probe" | "sandbox-relay";
|
|
124
|
+
metrics: BehavioralMetrics;
|
|
125
|
+
valironScore: number;
|
|
126
|
+
tier: MoodysRating;
|
|
127
|
+
riskLevel: RiskLevel;
|
|
128
|
+
testSummary: SandboxTestSummary;
|
|
129
|
+
message: string;
|
|
88
130
|
}
|
|
89
131
|
export interface ValironConfig {
|
|
90
132
|
/**
|
|
@@ -108,16 +150,6 @@ export interface ValironConfig {
|
|
|
108
150
|
*/
|
|
109
151
|
debug?: boolean;
|
|
110
152
|
}
|
|
111
|
-
export interface SubmitFeedbackParams {
|
|
112
|
-
agentId: string;
|
|
113
|
-
score: number;
|
|
114
|
-
outcome: 'success' | 'failure';
|
|
115
|
-
metadata?: Record<string, any>;
|
|
116
|
-
}
|
|
117
|
-
export interface SandboxTestParams {
|
|
118
|
-
agentId: string;
|
|
119
|
-
behaviorType?: 'good' | 'moderate' | 'bad';
|
|
120
|
-
}
|
|
121
153
|
export declare class ValironError extends Error {
|
|
122
154
|
code: string;
|
|
123
155
|
statusCode?: number | undefined;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,MAAM,aAAa,GACrB,MAAM,GACN,gBAAgB,GAChB,SAAS,GACT,cAAc,CAAC;AAEnB,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;AAEnD,MAAM,MAAM,YAAY,GACpB,KAAK,GACL,IAAI,GACJ,GAAG,GACH,KAAK,GACL,IAAI,GACJ,GAAG,GACH,KAAK,GACL,IAAI,GACJ,GAAG,CAAC;AAIR,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,iFAAiF;IACjF,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,+DAA+D;IAC/D,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAID,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACp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;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,gBAAgB,GAAG,eAAe,CAAC;IACzC,OAAO,EAAE,iBAAiB,CAAC;IAC3B,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,YAAY,CAAC;IACnB,SAAS,EAAE,SAAS,CAAC;IACrB,WAAW,EAAE,kBAAkB,CAAC;IAChC,OAAO,EAAE,MAAM,CAAC;CACjB;AAID,MAAM,WAAW,aAAa;IAC5B;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAID,qBAAa,YAAa,SAAQ,KAAK;IAG5B,IAAI,EAAE,MAAM;IACZ,UAAU,CAAC,EAAE,MAAM;gBAF1B,OAAO,EAAE,MAAM,EACR,IAAI,EAAE,MAAM,EACZ,UAAU,CAAC,EAAE,MAAM,YAAA;CAK7B"}
|
package/dist/types.js
CHANGED
|
@@ -2,16 +2,18 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Valiron SDK Types
|
|
4
4
|
*
|
|
5
|
-
* Type definitions for the Valiron
|
|
5
|
+
* Type definitions for the Valiron Operator API
|
|
6
|
+
* Matches the actual edge-proxy /operator/* endpoints
|
|
6
7
|
*/
|
|
7
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
9
|
exports.ValironError = void 0;
|
|
10
|
+
// ─── Errors ─────────────────────────────────────────────────────────────────
|
|
9
11
|
class ValironError extends Error {
|
|
10
12
|
constructor(message, code, statusCode) {
|
|
11
13
|
super(message);
|
|
12
14
|
this.code = code;
|
|
13
15
|
this.statusCode = statusCode;
|
|
14
|
-
this.name =
|
|
16
|
+
this.name = "ValironError";
|
|
15
17
|
}
|
|
16
18
|
}
|
|
17
19
|
exports.ValironError = ValironError;
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAmMH,+EAA+E;AAE/E,MAAa,YAAa,SAAQ,KAAK;IACrC,YACE,OAAe,EACR,IAAY,EACZ,UAAmB;QAE1B,KAAK,CAAC,OAAO,CAAC,CAAC;QAHR,SAAI,GAAJ,IAAI,CAAQ;QACZ,eAAU,GAAV,UAAU,CAAS;QAG1B,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;IAC7B,CAAC;CACF;AATD,oCASC"}
|
package/package.json
CHANGED
|
@@ -1,18 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@valiron/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Official TypeScript SDK for Valiron - Trust Layer for Agentic Economy",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"engines": {
|
|
8
8
|
"node": ">=18.0.0"
|
|
9
9
|
},
|
|
10
|
-
"scripts": {
|
|
11
|
-
"build": "tsc",
|
|
12
|
-
"dev": "tsc --watch",
|
|
13
|
-
"test": "node test/validate.mjs && node test/validate-examples.mjs",
|
|
14
|
-
"prepublishOnly": "pnpm build"
|
|
15
|
-
},
|
|
16
10
|
"keywords": [
|
|
17
11
|
"valiron",
|
|
18
12
|
"ai-agents",
|
|
@@ -37,5 +31,10 @@
|
|
|
37
31
|
"files": [
|
|
38
32
|
"dist",
|
|
39
33
|
"README.md"
|
|
40
|
-
]
|
|
41
|
-
|
|
34
|
+
],
|
|
35
|
+
"scripts": {
|
|
36
|
+
"build": "tsc",
|
|
37
|
+
"dev": "tsc --watch",
|
|
38
|
+
"test": "node test/validate.mjs && node test/validate-examples.mjs"
|
|
39
|
+
}
|
|
40
|
+
}
|