@tangle-network/agent-core 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/LICENSE +21 -0
- package/README.md +35 -0
- package/dist/auth/browser.d.ts +22 -0
- package/dist/auth/browser.d.ts.map +1 -0
- package/dist/auth/browser.js +43 -0
- package/dist/auth/browser.js.map +1 -0
- package/dist/auth/index.d.ts +430 -0
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/auth/index.js +841 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/computer-use/index.d.ts +122 -0
- package/dist/computer-use/index.d.ts.map +1 -0
- package/dist/computer-use/index.js +422 -0
- package/dist/computer-use/index.js.map +1 -0
- package/dist/errors-DJ6U6cHY.js +146 -0
- package/dist/errors-DJ6U6cHY.js.map +1 -0
- package/dist/events/index.d.ts +2 -0
- package/dist/events/index.js +2 -0
- package/dist/events-CUWh9qrv.js +263 -0
- package/dist/events-CUWh9qrv.js.map +1 -0
- package/dist/index-CFA8kgHJ.d.ts +352 -0
- package/dist/index-CFA8kgHJ.d.ts.map +1 -0
- package/dist/index-CtebBodu.d.ts +108 -0
- package/dist/index-CtebBodu.d.ts.map +1 -0
- package/dist/index-DiQX9bjq.d.ts +55 -0
- package/dist/index-DiQX9bjq.d.ts.map +1 -0
- package/dist/index-DlPznmKA.d.ts +158 -0
- package/dist/index-DlPznmKA.d.ts.map +1 -0
- package/dist/index-z2wPdzFb.d.ts +133 -0
- package/dist/index-z2wPdzFb.d.ts.map +1 -0
- package/dist/index.d.ts +565 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +822 -0
- package/dist/index.js.map +1 -0
- package/dist/resilience/index.d.ts +2 -0
- package/dist/resilience/index.js +2 -0
- package/dist/resilience-BQzDfw_C.js +221 -0
- package/dist/resilience-BQzDfw_C.js.map +1 -0
- package/dist/sse/index.d.ts +174 -0
- package/dist/sse/index.d.ts.map +1 -0
- package/dist/sse/index.js +303 -0
- package/dist/sse/index.js.map +1 -0
- package/dist/transport/index.d.ts +2 -0
- package/dist/transport/index.js +2 -0
- package/dist/transport-mKLoQep5.js +427 -0
- package/dist/transport-mKLoQep5.js.map +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.js +2 -0
- package/dist/types-D5VLaol0.js +31 -0
- package/dist/types-D5VLaol0.js.map +1 -0
- package/dist/types-DC6OJ1um.js +331 -0
- package/dist/types-DC6OJ1um.js.map +1 -0
- package/dist/types-DiDSGM8K.d.ts +320 -0
- package/dist/types-DiDSGM8K.d.ts.map +1 -0
- package/package.json +132 -0
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
import { n as SDKError } from "./index-DiQX9bjq.js";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
|
|
4
|
+
//#region src/auth/shared-providers.d.ts
|
|
5
|
+
/** Auth provider interface */
|
|
6
|
+
interface AuthProvider {
|
|
7
|
+
/** Get current token (called on each request) */
|
|
8
|
+
getToken(): Promise<string | null>;
|
|
9
|
+
/** Refresh expired token */
|
|
10
|
+
refreshToken?(): Promise<string>;
|
|
11
|
+
/** Called when token is rejected by server */
|
|
12
|
+
onTokenRejected?(error: SDKError): Promise<void>;
|
|
13
|
+
}
|
|
14
|
+
/** Simple static token auth */
|
|
15
|
+
declare class StaticTokenAuth implements AuthProvider {
|
|
16
|
+
private token;
|
|
17
|
+
constructor(token: string);
|
|
18
|
+
getToken(): Promise<string>;
|
|
19
|
+
setToken(token: string): void;
|
|
20
|
+
}
|
|
21
|
+
/** Token with refresh capability */
|
|
22
|
+
declare class RefreshableTokenAuth implements AuthProvider {
|
|
23
|
+
private config;
|
|
24
|
+
private accessToken;
|
|
25
|
+
private refreshTokenValue;
|
|
26
|
+
private expiresAt;
|
|
27
|
+
private refreshPromise;
|
|
28
|
+
constructor(config: {
|
|
29
|
+
accessToken: string;
|
|
30
|
+
refreshToken: string;
|
|
31
|
+
expiresIn: number;
|
|
32
|
+
onRefresh: (refreshToken: string) => Promise<{
|
|
33
|
+
accessToken: string;
|
|
34
|
+
refreshToken?: string;
|
|
35
|
+
expiresIn: number;
|
|
36
|
+
}>;
|
|
37
|
+
onRefreshFailed?: (error: Error) => void; /** Buffer before expiry to trigger refresh (default: 60s) */
|
|
38
|
+
refreshBuffer?: number;
|
|
39
|
+
});
|
|
40
|
+
getToken(): Promise<string>;
|
|
41
|
+
refreshToken(): Promise<string>;
|
|
42
|
+
private doRefresh;
|
|
43
|
+
onTokenRejected(error: SDKError): Promise<void>;
|
|
44
|
+
/** Check if token needs refresh */
|
|
45
|
+
isExpired(): boolean;
|
|
46
|
+
}
|
|
47
|
+
/** No auth (for public endpoints) */
|
|
48
|
+
declare class NoAuth implements AuthProvider {
|
|
49
|
+
getToken(): Promise<null>;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Callback-based auth for dynamic token retrieval.
|
|
53
|
+
* Useful when token comes from external source (user session, secure storage).
|
|
54
|
+
*/
|
|
55
|
+
declare class CallbackAuth implements AuthProvider {
|
|
56
|
+
private getTokenFn;
|
|
57
|
+
constructor(getTokenFn: () => string | null | Promise<string | null>);
|
|
58
|
+
getToken(): Promise<string | null>;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Read token auth for WebSocket connections.
|
|
62
|
+
* Wraps a read token with refresh capability.
|
|
63
|
+
*/
|
|
64
|
+
declare class ReadTokenAuth implements AuthProvider {
|
|
65
|
+
private config;
|
|
66
|
+
private token;
|
|
67
|
+
private expiresAt;
|
|
68
|
+
private refreshPromise;
|
|
69
|
+
private expiryWarned;
|
|
70
|
+
constructor(config: {
|
|
71
|
+
token: string;
|
|
72
|
+
expiresAt: number;
|
|
73
|
+
onRefresh: () => Promise<{
|
|
74
|
+
token: string;
|
|
75
|
+
expiresAt: number;
|
|
76
|
+
}>;
|
|
77
|
+
onExpiring?: (secondsRemaining: number) => void;
|
|
78
|
+
onRefreshFailed?: (error: Error) => void; /** Buffer before expiry to trigger refresh (default: 60s) */
|
|
79
|
+
refreshBuffer?: number; /** Buffer before expiry to trigger warning (default: 60s) */
|
|
80
|
+
warningBuffer?: number;
|
|
81
|
+
});
|
|
82
|
+
getToken(): Promise<string>;
|
|
83
|
+
refreshToken(): Promise<string>;
|
|
84
|
+
private doRefresh;
|
|
85
|
+
/** Check if token is expired */
|
|
86
|
+
isExpired(): boolean;
|
|
87
|
+
/** Get seconds until expiry */
|
|
88
|
+
getSecondsRemaining(): number;
|
|
89
|
+
}
|
|
90
|
+
//#endregion
|
|
91
|
+
//#region src/auth/types.d.ts
|
|
92
|
+
/**
|
|
93
|
+
* Product configuration for multi-tenant orchestrator.
|
|
94
|
+
*/
|
|
95
|
+
declare const ProductSchema: z.ZodObject<{
|
|
96
|
+
product_id: z.ZodString;
|
|
97
|
+
name: z.ZodString;
|
|
98
|
+
api_key: z.ZodString;
|
|
99
|
+
secrets: z.ZodObject<{
|
|
100
|
+
current: z.ZodObject<{
|
|
101
|
+
secret: z.ZodString;
|
|
102
|
+
created_at: z.ZodNumber;
|
|
103
|
+
}, z.core.$strip>;
|
|
104
|
+
previous: z.ZodOptional<z.ZodObject<{
|
|
105
|
+
secret: z.ZodString;
|
|
106
|
+
created_at: z.ZodNumber;
|
|
107
|
+
expires_at: z.ZodNumber;
|
|
108
|
+
}, z.core.$strip>>;
|
|
109
|
+
}, z.core.$strip>;
|
|
110
|
+
token_config: z.ZodObject<{
|
|
111
|
+
free_ttl_minutes: z.ZodDefault<z.ZodNumber>;
|
|
112
|
+
paid_ttl_minutes: z.ZodDefault<z.ZodNumber>;
|
|
113
|
+
max_ttl_minutes: z.ZodDefault<z.ZodNumber>;
|
|
114
|
+
}, z.core.$strip>;
|
|
115
|
+
rate_limits: z.ZodObject<{
|
|
116
|
+
max_concurrent_sessions: z.ZodDefault<z.ZodNumber>;
|
|
117
|
+
max_sessions_per_minute: z.ZodDefault<z.ZodNumber>;
|
|
118
|
+
max_requests_per_minute: z.ZodDefault<z.ZodNumber>;
|
|
119
|
+
}, z.core.$strip>;
|
|
120
|
+
unlimited: z.ZodDefault<z.ZodBoolean>;
|
|
121
|
+
internal_notes: z.ZodOptional<z.ZodString>;
|
|
122
|
+
webhook_url: z.ZodOptional<z.ZodString>;
|
|
123
|
+
status: z.ZodDefault<z.ZodEnum<{
|
|
124
|
+
active: "active";
|
|
125
|
+
suspended: "suspended";
|
|
126
|
+
deleted: "deleted";
|
|
127
|
+
}>>;
|
|
128
|
+
deployment_type: z.ZodDefault<z.ZodEnum<{
|
|
129
|
+
shared: "shared";
|
|
130
|
+
"customer-hosted": "customer-hosted";
|
|
131
|
+
}>>;
|
|
132
|
+
customer_orchestrator: z.ZodOptional<z.ZodObject<{
|
|
133
|
+
url: z.ZodString;
|
|
134
|
+
api_key: z.ZodString;
|
|
135
|
+
}, z.core.$strip>>;
|
|
136
|
+
created_at: z.ZodString;
|
|
137
|
+
updated_at: z.ZodString;
|
|
138
|
+
}, z.core.$strip>;
|
|
139
|
+
type Product = z.infer<typeof ProductSchema>;
|
|
140
|
+
/**
|
|
141
|
+
* Token scope types for multi-tenant access control.
|
|
142
|
+
*
|
|
143
|
+
* - "session": Access to a single session (requires sid)
|
|
144
|
+
* - "project": Access to all sessions within a project (requires projectId)
|
|
145
|
+
* - "batch": Access to multiple projects (requires projectIds array)
|
|
146
|
+
*/
|
|
147
|
+
type TokenScope = "session" | "project" | "batch";
|
|
148
|
+
/**
|
|
149
|
+
* Session-scoped token payload.
|
|
150
|
+
* Grants access to a single session's events.
|
|
151
|
+
*/
|
|
152
|
+
declare const SessionScopedTokenPayloadSchema: z.ZodObject<{
|
|
153
|
+
sub: z.ZodString;
|
|
154
|
+
pid: z.ZodString;
|
|
155
|
+
cid: z.ZodOptional<z.ZodString>;
|
|
156
|
+
typ: z.ZodLiteral<"read">;
|
|
157
|
+
iat: z.ZodNumber;
|
|
158
|
+
exp: z.ZodNumber;
|
|
159
|
+
sid: z.ZodString;
|
|
160
|
+
projectId: z.ZodOptional<z.ZodUndefined>;
|
|
161
|
+
projectIds: z.ZodOptional<z.ZodUndefined>;
|
|
162
|
+
}, z.core.$strip>;
|
|
163
|
+
/**
|
|
164
|
+
* Project-scoped token payload.
|
|
165
|
+
* Grants access to all sessions within a single project.
|
|
166
|
+
*/
|
|
167
|
+
declare const ProjectScopedTokenPayloadSchema: z.ZodObject<{
|
|
168
|
+
sub: z.ZodString;
|
|
169
|
+
pid: z.ZodString;
|
|
170
|
+
cid: z.ZodOptional<z.ZodString>;
|
|
171
|
+
typ: z.ZodLiteral<"read">;
|
|
172
|
+
iat: z.ZodNumber;
|
|
173
|
+
exp: z.ZodNumber;
|
|
174
|
+
sid: z.ZodOptional<z.ZodUndefined>;
|
|
175
|
+
projectId: z.ZodString;
|
|
176
|
+
projectIds: z.ZodOptional<z.ZodUndefined>;
|
|
177
|
+
}, z.core.$strip>;
|
|
178
|
+
/**
|
|
179
|
+
* Batch-scoped token payload.
|
|
180
|
+
* Grants access to multiple projects (organization-level access).
|
|
181
|
+
*/
|
|
182
|
+
declare const BatchScopedTokenPayloadSchema: z.ZodObject<{
|
|
183
|
+
sub: z.ZodString;
|
|
184
|
+
pid: z.ZodString;
|
|
185
|
+
cid: z.ZodOptional<z.ZodString>;
|
|
186
|
+
typ: z.ZodLiteral<"read">;
|
|
187
|
+
iat: z.ZodNumber;
|
|
188
|
+
exp: z.ZodNumber;
|
|
189
|
+
sid: z.ZodOptional<z.ZodUndefined>;
|
|
190
|
+
projectId: z.ZodOptional<z.ZodUndefined>;
|
|
191
|
+
projectIds: z.ZodArray<z.ZodString>;
|
|
192
|
+
}, z.core.$strip>;
|
|
193
|
+
/**
|
|
194
|
+
* Read token payload (JWT claims for WebSocket auth).
|
|
195
|
+
*
|
|
196
|
+
* Supports three scopes:
|
|
197
|
+
* - Session: sid present (single session)
|
|
198
|
+
* - Project: projectId present (all sessions in project)
|
|
199
|
+
* - Batch: projectIds present (multiple projects)
|
|
200
|
+
*
|
|
201
|
+
* For backwards compatibility, tokens with sid are session-scoped.
|
|
202
|
+
*/
|
|
203
|
+
declare const ReadTokenPayloadSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
204
|
+
sub: z.ZodString;
|
|
205
|
+
pid: z.ZodString;
|
|
206
|
+
cid: z.ZodOptional<z.ZodString>;
|
|
207
|
+
typ: z.ZodLiteral<"read">;
|
|
208
|
+
iat: z.ZodNumber;
|
|
209
|
+
exp: z.ZodNumber;
|
|
210
|
+
sid: z.ZodString;
|
|
211
|
+
projectId: z.ZodOptional<z.ZodUndefined>;
|
|
212
|
+
projectIds: z.ZodOptional<z.ZodUndefined>;
|
|
213
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
214
|
+
sub: z.ZodString;
|
|
215
|
+
pid: z.ZodString;
|
|
216
|
+
cid: z.ZodOptional<z.ZodString>;
|
|
217
|
+
typ: z.ZodLiteral<"read">;
|
|
218
|
+
iat: z.ZodNumber;
|
|
219
|
+
exp: z.ZodNumber;
|
|
220
|
+
sid: z.ZodOptional<z.ZodUndefined>;
|
|
221
|
+
projectId: z.ZodString;
|
|
222
|
+
projectIds: z.ZodOptional<z.ZodUndefined>;
|
|
223
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
224
|
+
sub: z.ZodString;
|
|
225
|
+
pid: z.ZodString;
|
|
226
|
+
cid: z.ZodOptional<z.ZodString>;
|
|
227
|
+
typ: z.ZodLiteral<"read">;
|
|
228
|
+
iat: z.ZodNumber;
|
|
229
|
+
exp: z.ZodNumber;
|
|
230
|
+
sid: z.ZodOptional<z.ZodUndefined>;
|
|
231
|
+
projectId: z.ZodOptional<z.ZodUndefined>;
|
|
232
|
+
projectIds: z.ZodArray<z.ZodString>;
|
|
233
|
+
}, z.core.$strip>]>;
|
|
234
|
+
type ReadTokenPayload = z.infer<typeof ReadTokenPayloadSchema>;
|
|
235
|
+
type SessionScopedTokenPayload = z.infer<typeof SessionScopedTokenPayloadSchema>;
|
|
236
|
+
type ProjectScopedTokenPayload = z.infer<typeof ProjectScopedTokenPayloadSchema>;
|
|
237
|
+
type BatchScopedTokenPayload = z.infer<typeof BatchScopedTokenPayloadSchema>;
|
|
238
|
+
/**
|
|
239
|
+
* Token validation result.
|
|
240
|
+
*/
|
|
241
|
+
interface TokenValidationResult {
|
|
242
|
+
valid: boolean;
|
|
243
|
+
payload?: ReadTokenPayload;
|
|
244
|
+
/** Token scope (session, project, or batch) */
|
|
245
|
+
scope?: TokenScope;
|
|
246
|
+
error?: string;
|
|
247
|
+
errorCode?: "TOKEN_MISSING" | "TOKEN_INVALID" | "TOKEN_EXPIRED" | "TOKEN_WRONG_TYPE" | "PRODUCT_NOT_FOUND" | "PRODUCT_SUSPENDED" | "SIGNATURE_INVALID";
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* Product secrets structure.
|
|
251
|
+
*/
|
|
252
|
+
interface ProductSecrets {
|
|
253
|
+
current: {
|
|
254
|
+
secret: string;
|
|
255
|
+
created_at: number;
|
|
256
|
+
};
|
|
257
|
+
previous?: {
|
|
258
|
+
secret: string;
|
|
259
|
+
created_at: number;
|
|
260
|
+
expires_at: number;
|
|
261
|
+
};
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Minimal product info for token validation (avoids full product lookup).
|
|
265
|
+
*/
|
|
266
|
+
interface ProductAuthInfo {
|
|
267
|
+
product_id: string;
|
|
268
|
+
secrets: ProductSecrets;
|
|
269
|
+
status: "active" | "suspended" | "deleted";
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* Session creation request from product backend.
|
|
273
|
+
*/
|
|
274
|
+
declare const CreateSessionRequestSchema: z.ZodObject<{
|
|
275
|
+
user_id: z.ZodString;
|
|
276
|
+
project_ref: z.ZodOptional<z.ZodString>;
|
|
277
|
+
tier: z.ZodDefault<z.ZodUnion<[z.ZodEnum<{
|
|
278
|
+
free: "free";
|
|
279
|
+
pro: "pro";
|
|
280
|
+
enterprise: "enterprise";
|
|
281
|
+
}>, z.ZodPipe<z.ZodLiteral<"paid">, z.ZodTransform<"pro", "paid">>]>>;
|
|
282
|
+
config: z.ZodOptional<z.ZodObject<{
|
|
283
|
+
image: z.ZodOptional<z.ZodString>;
|
|
284
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
285
|
+
resources: z.ZodOptional<z.ZodObject<{
|
|
286
|
+
cpu: z.ZodOptional<z.ZodNumber>;
|
|
287
|
+
memory: z.ZodOptional<z.ZodString>;
|
|
288
|
+
}, z.core.$strip>>;
|
|
289
|
+
}, z.core.$strip>>;
|
|
290
|
+
}, z.core.$strip>;
|
|
291
|
+
type CreateSessionRequest = z.infer<typeof CreateSessionRequestSchema>;
|
|
292
|
+
/**
|
|
293
|
+
* Session creation response to product backend.
|
|
294
|
+
*/
|
|
295
|
+
interface CreateSessionResponse {
|
|
296
|
+
session_id: string;
|
|
297
|
+
sidecar_id: string;
|
|
298
|
+
websocket_url: string;
|
|
299
|
+
}
|
|
300
|
+
/**
|
|
301
|
+
* Message send request from product backend.
|
|
302
|
+
*
|
|
303
|
+
* `metadata` is intentionally free-form (.passthrough): the wire format
|
|
304
|
+
* accepts arbitrary product-specific keys without requiring a schema bump.
|
|
305
|
+
* Only `model` is named today; legacy gateway-credential fields previously
|
|
306
|
+
* declared here were never read internally and have been dropped — any
|
|
307
|
+
* such fields sent by older callers continue to flow through .passthrough.
|
|
308
|
+
*/
|
|
309
|
+
declare const SendMessageRequestSchema: z.ZodObject<{
|
|
310
|
+
content: z.ZodString;
|
|
311
|
+
user_id: z.ZodString;
|
|
312
|
+
execution_id: z.ZodOptional<z.ZodString>;
|
|
313
|
+
metadata: z.ZodOptional<z.ZodObject<{
|
|
314
|
+
model: z.ZodOptional<z.ZodString>;
|
|
315
|
+
}, z.core.$loose>>;
|
|
316
|
+
}, z.core.$strip>;
|
|
317
|
+
type SendMessageRequest = z.infer<typeof SendMessageRequestSchema>;
|
|
318
|
+
//#endregion
|
|
319
|
+
export { ReadTokenAuth as C, NoAuth as S, StaticTokenAuth as T, SessionScopedTokenPayloadSchema as _, CreateSessionResponse as a, AuthProvider as b, ProductSchema as c, ProjectScopedTokenPayloadSchema as d, ReadTokenPayload as f, SessionScopedTokenPayload as g, SendMessageRequestSchema as h, CreateSessionRequestSchema as i, ProductSecrets as l, SendMessageRequest as m, BatchScopedTokenPayloadSchema as n, Product as o, ReadTokenPayloadSchema as p, CreateSessionRequest as r, ProductAuthInfo as s, BatchScopedTokenPayload as t, ProjectScopedTokenPayload as u, TokenScope as v, RefreshableTokenAuth as w, CallbackAuth as x, TokenValidationResult as y };
|
|
320
|
+
//# sourceMappingURL=types-DiDSGM8K.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-DiDSGM8K.d.ts","names":[],"sources":["../src/auth/shared-providers.ts","../src/auth/types.ts"],"mappings":";;;;;UAUiB,YAAA;EAMS;EAJxB,QAAA,IAAY,OAAA;EAI8B;EAF1C,YAAA,KAAiB,OAAA;EAFjB;EAIA,eAAA,EAAiB,KAAA,EAAO,QAAA,GAAW,OAAA;AAAA;;cAIxB,eAAA,YAA2B,YAAA;EAAA,QAClB,KAAA;cAAA,KAAA;EAEd,QAAA,CAAA,GAAY,OAAA;EAIlB,QAAA,CAAS,KAAA;AAAA;AAPX;AAAA,cAaa,oBAAA,YAAgC,YAAA;EAAA,QAOjC,MAAA;EAAA,QANF,WAAA;EAAA,QACA,iBAAA;EAAA,QACA,SAAA;EAAA,QACA,cAAA;cAGE,MAAA;IACN,WAAA;IACA,YAAA;IACA,SAAA;IACA,SAAA,GAAY,YAAA,aAAyB,OAAA;MACnC,WAAA;MACA,YAAA;MACA,SAAA;IAAA;IAEF,eAAA,IAAmB,KAAA,EAAO,KAAA,WALW;IAOrC,aAAA;EAAA;EAQE,QAAA,CAAA,GAAY,OAAA;EAWZ,YAAA,CAAA,GAAgB,OAAA;EAAA,QAeR,SAAA;EAqBR,eAAA,CAAgB,KAAA,EAAO,QAAA,GAAW,OAAA;EAzEe;EAiFvD,SAAA,CAAA;AAAA;;cAMW,MAAA,YAAkB,YAAA;EACvB,QAAA,CAAA,GAAY,OAAA;AAAA;;;;;cASP,YAAA,YAAwB,YAAA;EAAA,QAEzB,UAAA;cAAA,UAAA,wBAAkC,OAAA;EAGtC,QAAA,CAAA,GAAY,OAAA;AAAA;;;;;cASP,aAAA,YAAyB,YAAA;EAAA,QAO1B,MAAA;EAAA,QANF,KAAA;EAAA,QACA,SAAA;EAAA,QACA,cAAA;EAAA,QACA,YAAA;cAGE,MAAA;IACN,KAAA;IACA,SAAA;IACA,SAAA,QAAiB,OAAA;MAAU,KAAA;MAAe,SAAA;IAAA;IAC1C,UAAA,IAAc,gBAAA;IACd,eAAA,IAAmB,KAAA,EAAO,KAAA,WApCnB;IAsCP,aAAA,WArCc;IAuCd,aAAA;EAAA;EAOE,QAAA,CAAA,GAAY,OAAA;EAoBZ,YAAA,CAAA,GAAgB,OAAA;EAAA,QAeR,SAAA;EAjFW;EAiGzB,SAAA,CAAA;EAxFwB;EA6FxB,mBAAA,CAAA;AAAA;;;;;;cCpNW,aAAA,EAAa,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA+Fd,OAAA,GAAU,CAAA,CAAE,KAAA,QAAa,aAAA;;;;;;;;KASzB,UAAA;;;;;cA6BC,+BAAA,EAA+B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;cAa/B,+BAAA,EAA+B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;cAa/B,6BAAA,EAA6B,CAAA,CAAA,SAAA;;;;;;;;;;;;AD1B1C;;;;;;;;;cC6Ca,sBAAA,EAAsB,CAAA,CAAA,QAAA,WAAA,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAMvB,gBAAA,GAAmB,CAAA,CAAE,KAAA,QAAa,sBAAA;AAAA,KAClC,yBAAA,GAA4B,CAAA,CAAE,KAAA,QACjC,+BAAA;AAAA,KAEG,yBAAA,GAA4B,CAAA,CAAE,KAAA,QACjC,+BAAA;AAAA,KAEG,uBAAA,GAA0B,CAAA,CAAE,KAAA,QAC/B,6BAAA;;;;UAMQ,qBAAA;EACf,KAAA;EACA,OAAA,GAAU,gBAAA;;EAEV,KAAA,GAAQ,UAAA;EACR,KAAA;EACA,SAAA;AAAA;;;;UAae,cAAA;EACf,OAAA;IACE,MAAA;IACA,UAAA;EAAA;EAEF,QAAA;IACE,MAAA;IACA,UAAA;IACA,UAAA;EAAA;AAAA;;;;UAOa,eAAA;EACf,UAAA;EACA,OAAA,EAAS,cAAA;EACT,MAAA;AAAA;;;;cAMW,0BAAA,EAA0B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;KAqB3B,oBAAA,GAAuB,CAAA,CAAE,KAAA,QAAa,0BAAA;;;;UAKjC,qBAAA;EACf,UAAA;EACA,UAAA;EACA,aAAA;AAAA;;;;;;;;;;cAYW,wBAAA,EAAwB,CAAA,CAAA,SAAA;;;;;;;;KAYzB,kBAAA,GAAqB,CAAA,CAAE,KAAA,QAAa,wBAAA"}
|
package/package.json
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@tangle-network/agent-core",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Core transport interfaces, event utilities, auth, SSE parsing, and resilience primitives for talking to Tangle agents",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"main": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": "./dist/index.js",
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"default": "./dist/index.js"
|
|
14
|
+
},
|
|
15
|
+
"./transport": {
|
|
16
|
+
"import": "./dist/transport/index.js",
|
|
17
|
+
"types": "./dist/transport/index.d.ts",
|
|
18
|
+
"default": "./dist/transport/index.js"
|
|
19
|
+
},
|
|
20
|
+
"./events": {
|
|
21
|
+
"import": "./dist/events/index.js",
|
|
22
|
+
"types": "./dist/events/index.d.ts",
|
|
23
|
+
"default": "./dist/events/index.js"
|
|
24
|
+
},
|
|
25
|
+
"./types": {
|
|
26
|
+
"import": "./dist/types/index.js",
|
|
27
|
+
"types": "./dist/types/index.d.ts",
|
|
28
|
+
"default": "./dist/types/index.js"
|
|
29
|
+
},
|
|
30
|
+
"./sse": {
|
|
31
|
+
"import": "./dist/sse/index.js",
|
|
32
|
+
"types": "./dist/sse/index.d.ts",
|
|
33
|
+
"default": "./dist/sse/index.js"
|
|
34
|
+
},
|
|
35
|
+
"./auth": {
|
|
36
|
+
"import": "./dist/auth/index.js",
|
|
37
|
+
"types": "./dist/auth/index.d.ts",
|
|
38
|
+
"default": "./dist/auth/index.js"
|
|
39
|
+
},
|
|
40
|
+
"./auth/browser": {
|
|
41
|
+
"import": "./dist/auth/browser.js",
|
|
42
|
+
"types": "./dist/auth/browser.d.ts",
|
|
43
|
+
"default": "./dist/auth/browser.js"
|
|
44
|
+
},
|
|
45
|
+
"./resilience": {
|
|
46
|
+
"import": "./dist/resilience/index.js",
|
|
47
|
+
"types": "./dist/resilience/index.d.ts",
|
|
48
|
+
"default": "./dist/resilience/index.js"
|
|
49
|
+
},
|
|
50
|
+
"./computer-use": {
|
|
51
|
+
"import": "./dist/computer-use/index.js",
|
|
52
|
+
"types": "./dist/computer-use/index.d.ts",
|
|
53
|
+
"default": "./dist/computer-use/index.js"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"typesVersions": {
|
|
57
|
+
"*": {
|
|
58
|
+
"auth": [
|
|
59
|
+
"src/auth/index.ts"
|
|
60
|
+
],
|
|
61
|
+
"auth/*": [
|
|
62
|
+
"src/auth/*"
|
|
63
|
+
],
|
|
64
|
+
"auth/browser": [
|
|
65
|
+
"src/auth/browser.ts"
|
|
66
|
+
],
|
|
67
|
+
"events": [
|
|
68
|
+
"src/events/index.ts"
|
|
69
|
+
],
|
|
70
|
+
"events/*": [
|
|
71
|
+
"src/events/*"
|
|
72
|
+
],
|
|
73
|
+
"resilience": [
|
|
74
|
+
"src/resilience/index.ts"
|
|
75
|
+
],
|
|
76
|
+
"resilience/*": [
|
|
77
|
+
"src/resilience/*"
|
|
78
|
+
],
|
|
79
|
+
"computer-use": [
|
|
80
|
+
"src/computer-use/index.ts"
|
|
81
|
+
],
|
|
82
|
+
"computer-use/*": [
|
|
83
|
+
"src/computer-use/*"
|
|
84
|
+
],
|
|
85
|
+
"transport": [
|
|
86
|
+
"src/transport/index.ts"
|
|
87
|
+
],
|
|
88
|
+
"transport/*": [
|
|
89
|
+
"src/transport/*"
|
|
90
|
+
],
|
|
91
|
+
"types": [
|
|
92
|
+
"src/types/index.ts"
|
|
93
|
+
],
|
|
94
|
+
"types/*": [
|
|
95
|
+
"src/types/*"
|
|
96
|
+
],
|
|
97
|
+
"*": [
|
|
98
|
+
"src/index.ts"
|
|
99
|
+
]
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"repository": {
|
|
103
|
+
"type": "git",
|
|
104
|
+
"url": "git+https://github.com/tangle-network/agent-sdk.git",
|
|
105
|
+
"directory": "packages/agent-core"
|
|
106
|
+
},
|
|
107
|
+
"publishConfig": {
|
|
108
|
+
"access": "public",
|
|
109
|
+
"registry": "https://registry.npmjs.org"
|
|
110
|
+
},
|
|
111
|
+
"files": [
|
|
112
|
+
"dist",
|
|
113
|
+
"README.md",
|
|
114
|
+
"LICENSE"
|
|
115
|
+
],
|
|
116
|
+
"dependencies": {
|
|
117
|
+
"zod": "4.4.3",
|
|
118
|
+
"@tangle-network/agent-interface": "0.11.0"
|
|
119
|
+
},
|
|
120
|
+
"devDependencies": {
|
|
121
|
+
"@types/node": "25.6.0",
|
|
122
|
+
"tsdown": "0.21.10",
|
|
123
|
+
"typescript": "^6.0.3",
|
|
124
|
+
"vitest": "^4.1.5"
|
|
125
|
+
},
|
|
126
|
+
"scripts": {
|
|
127
|
+
"build": "tsdown",
|
|
128
|
+
"check-types": "tsc --noEmit",
|
|
129
|
+
"test": "vitest run",
|
|
130
|
+
"test:watch": "vitest"
|
|
131
|
+
}
|
|
132
|
+
}
|