@vaultysclaw/shared 0.0.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/LICENSE +21 -0
- package/README.md +33 -0
- package/dist/channel-types.d.ts +170 -0
- package/dist/channel-types.d.ts.map +1 -0
- package/dist/channel-types.js +6 -0
- package/dist/channel-types.js.map +1 -0
- package/dist/constants/docs.d.ts +4 -0
- package/dist/constants/docs.d.ts.map +1 -0
- package/dist/constants/docs.js +4 -0
- package/dist/constants/docs.js.map +1 -0
- package/dist/constants/git.d.ts +7 -0
- package/dist/constants/git.d.ts.map +1 -0
- package/dist/constants/git.js +7 -0
- package/dist/constants/git.js.map +1 -0
- package/dist/constants/index.d.ts +9 -0
- package/dist/constants/index.d.ts.map +1 -0
- package/dist/constants/index.js +9 -0
- package/dist/constants/index.js.map +1 -0
- package/dist/constants/vaultys.d.ts +2 -0
- package/dist/constants/vaultys.d.ts.map +1 -0
- package/dist/constants/vaultys.js +2 -0
- package/dist/constants/vaultys.js.map +1 -0
- package/dist/errors.d.ts +54 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +77 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -0
- package/dist/security.d.ts +17 -0
- package/dist/security.d.ts.map +1 -0
- package/dist/security.js +19 -0
- package/dist/security.js.map +1 -0
- package/dist/types.d.ts +554 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +5 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/colors.d.ts +73 -0
- package/dist/utils/colors.d.ts.map +1 -0
- package/dist/utils/colors.js +92 -0
- package/dist/utils/colors.js.map +1 -0
- package/dist/utils/formatting.d.ts +57 -0
- package/dist/utils/formatting.d.ts.map +1 -0
- package/dist/utils/formatting.js +154 -0
- package/dist/utils/formatting.js.map +1 -0
- package/dist/utils/index.d.ts +6 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +6 -0
- package/dist/utils/index.js.map +1 -0
- package/package.json +26 -0
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,554 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Core types for VaultysClaw agent orchestration platform
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Non-transferable identity bound to a specific instance
|
|
6
|
+
*/
|
|
7
|
+
export interface VaultysIdentity {
|
|
8
|
+
id: string;
|
|
9
|
+
publicKey: string;
|
|
10
|
+
type: "control_plane" | "agent_controller";
|
|
11
|
+
createdAt: Date;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Agent capability/permission grant
|
|
15
|
+
*/
|
|
16
|
+
export type AgentCapability = "file_access" | "internet_access" | "browser_control" | "api_call" | "mail_send" | "code_execution" | "system_command" | "agent_communication" | "knowledge_search";
|
|
17
|
+
/**
|
|
18
|
+
* Runtime constraints embedded in the agent certificate alongside capabilities.
|
|
19
|
+
* All fields are optional — omitting a field means no limit for that dimension.
|
|
20
|
+
*/
|
|
21
|
+
export interface ResourceLimits {
|
|
22
|
+
maxTokensPerDay?: number;
|
|
23
|
+
maxRequestsPerHour?: number;
|
|
24
|
+
allowedDomains?: string[];
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Policy that defines what an agent controller can do.
|
|
28
|
+
* @deprecated Use the governance policies table + ResourceLimits + cert-embedded enforcement.
|
|
29
|
+
*/
|
|
30
|
+
export interface AgentPolicy {
|
|
31
|
+
id: string;
|
|
32
|
+
agentControllerId: string;
|
|
33
|
+
capabilities: AgentCapability[];
|
|
34
|
+
resourceLimits?: ResourceLimits;
|
|
35
|
+
timeWindow?: {
|
|
36
|
+
startTime: string;
|
|
37
|
+
endTime: string;
|
|
38
|
+
};
|
|
39
|
+
updatedAt: Date;
|
|
40
|
+
signedBy: string;
|
|
41
|
+
signature: string;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Intent signed by an agent controller - request to perform an action
|
|
45
|
+
*/
|
|
46
|
+
export interface SignedIntent {
|
|
47
|
+
id: string;
|
|
48
|
+
agentControllerId: string;
|
|
49
|
+
action: string;
|
|
50
|
+
params: Record<string, any>;
|
|
51
|
+
timestamp: Date;
|
|
52
|
+
signature: string;
|
|
53
|
+
publicKey: string;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Result of executing an intent
|
|
57
|
+
*/
|
|
58
|
+
export interface ExecutionResult {
|
|
59
|
+
intentId: string;
|
|
60
|
+
status: "success" | "failed" | "pending";
|
|
61
|
+
output?: any;
|
|
62
|
+
error?: string;
|
|
63
|
+
executedAt: Date;
|
|
64
|
+
signature?: string;
|
|
65
|
+
publicKey?: string;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Agent controller registration
|
|
69
|
+
*/
|
|
70
|
+
export interface AgentControllerRegistration {
|
|
71
|
+
id: string;
|
|
72
|
+
name: string;
|
|
73
|
+
publicKey: string;
|
|
74
|
+
endpoint: string;
|
|
75
|
+
capabilities: AgentCapability[];
|
|
76
|
+
registeredAt: Date;
|
|
77
|
+
lastHeartbeat?: Date;
|
|
78
|
+
metadata?: Record<string, any>;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Message exchanged between control plane and agent controller
|
|
82
|
+
*/
|
|
83
|
+
export interface ProtocolMessage {
|
|
84
|
+
version: "1.0";
|
|
85
|
+
messageId: string;
|
|
86
|
+
type: "intent" | "policy_update" | "heartbeat" | "result" | "ack" | "error";
|
|
87
|
+
sender: string;
|
|
88
|
+
receiver: string;
|
|
89
|
+
payload: any;
|
|
90
|
+
timestamp: Date;
|
|
91
|
+
signature: string;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Request to register an agent controller
|
|
95
|
+
*/
|
|
96
|
+
export interface RegistrationRequest {
|
|
97
|
+
name: string;
|
|
98
|
+
publicKey: string;
|
|
99
|
+
endpoint: string;
|
|
100
|
+
capabilities?: AgentCapability[];
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* WebSocket message types for agent-control plane communication
|
|
104
|
+
*/
|
|
105
|
+
export type WSMessageType = "register" | "register_ack" | "registration_pending" | "registration_approved" | "registration_rejected" | "auth_challenge" | "auth_complete" | "auth_failed" | "update_capabilities" | "delegation_update" | "intent" | "intent_ack" | "policy_update" | "policy_ack" | "heartbeat" | "pong" | "result" | "error" | "llm_config" | "chat_message" | "chat_response" | "tool_approval_request" | "tool_approval_response" | "tool_execution" | "task_enqueue" | "task_status" | "schedule_update" | "schedule_delete" | "get_chat_sessions" | "chat_sessions_response" | "get_chat_history" | "chat_history_response" | "agent_peer_catalog" | "skills_config" | "knowledge_sync" | "knowledge_sync_result" | "knowledge_status_sync" | "channel_event" | "channel_message_send";
|
|
106
|
+
/**
|
|
107
|
+
* LLM provider type — controls which AI SDK provider is instantiated.
|
|
108
|
+
* - openai → OpenAI API (GPT-4o, o3, etc.)
|
|
109
|
+
* - anthropic → Anthropic API (Claude 3/4)
|
|
110
|
+
* - google → Google Generative AI (Gemini 2.x)
|
|
111
|
+
* - ollama → Local Ollama (any pulled model)
|
|
112
|
+
* - openai-compatible → Any OpenAI-compatible server (LM Studio, llama.cpp, Groq, etc.)
|
|
113
|
+
*/
|
|
114
|
+
export type LlmProviderType = "openai" | "anthropic" | "google" | "ollama" | "openai-compatible";
|
|
115
|
+
/**
|
|
116
|
+
* LLM configuration shared between agent controller and control plane.
|
|
117
|
+
* Stored in the agent's local DB (remote config) or loaded from env vars (local config).
|
|
118
|
+
*/
|
|
119
|
+
export interface LlmConfig {
|
|
120
|
+
provider: LlmProviderType;
|
|
121
|
+
/** Model identifier as required by the provider (e.g. "gpt-4o", "claude-sonnet-4-5", "llama3.2"). */
|
|
122
|
+
model: string;
|
|
123
|
+
/** API key for cloud providers. Never returned in GET responses. */
|
|
124
|
+
apiKey?: string;
|
|
125
|
+
/** Base URL override — required for ollama/openai-compatible, optional for OpenAI-compatible clouds. */
|
|
126
|
+
baseUrl?: string;
|
|
127
|
+
/** Optional system prompt sent on every intent. Defaults to a built-in agent system prompt. */
|
|
128
|
+
systemPrompt?: string;
|
|
129
|
+
/** Max tokens for the LLM response. */
|
|
130
|
+
maxTokens?: number;
|
|
131
|
+
/** Price per million input tokens in USD. Used to estimate costs. */
|
|
132
|
+
pricePerMillionInputTokens?: number;
|
|
133
|
+
/** Price per million output tokens in USD. Used to estimate costs. */
|
|
134
|
+
pricePerMillionOutputTokens?: number;
|
|
135
|
+
/** Embedding model override for RAG knowledge base indexing. */
|
|
136
|
+
embeddingModel?: string;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Sent by control plane to push (or clear) LLM configuration to an agent.
|
|
140
|
+
* When config is null the agent falls back to its local env-var config.
|
|
141
|
+
*/
|
|
142
|
+
export interface WSLlmConfigPayload {
|
|
143
|
+
config: LlmConfig | null;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Token usage statistics reported by agent in heartbeat.
|
|
147
|
+
*/
|
|
148
|
+
export interface TokenUsageReport {
|
|
149
|
+
total: {
|
|
150
|
+
promptTokens: number;
|
|
151
|
+
completionTokens: number;
|
|
152
|
+
};
|
|
153
|
+
sinceLastSync: {
|
|
154
|
+
promptTokens: number;
|
|
155
|
+
completionTokens: number;
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Sent by agent periodically to indicate it's alive.
|
|
160
|
+
* Includes system stats, active LLM config, and token usage.
|
|
161
|
+
*/
|
|
162
|
+
export interface WSHeartbeatPayload {
|
|
163
|
+
uptime: number;
|
|
164
|
+
memory: NodeJS.MemoryUsage;
|
|
165
|
+
activeLlm?: {
|
|
166
|
+
provider: LlmProviderType;
|
|
167
|
+
model: string;
|
|
168
|
+
};
|
|
169
|
+
name: string;
|
|
170
|
+
tokenUsage: TokenUsageReport;
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* WebSocket message wrapper
|
|
174
|
+
*/
|
|
175
|
+
export interface WSMessage {
|
|
176
|
+
messageId: string;
|
|
177
|
+
type: WSMessageType;
|
|
178
|
+
agentId?: string;
|
|
179
|
+
payload: any;
|
|
180
|
+
timestamp: string;
|
|
181
|
+
signature?: string;
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Agent registration via WebSocket
|
|
185
|
+
*/
|
|
186
|
+
export interface WSRegisterPayload {
|
|
187
|
+
name: string;
|
|
188
|
+
version: string;
|
|
189
|
+
capabilities: AgentCapability[];
|
|
190
|
+
publicKey: string;
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Acknowledgment for WebSocket messages
|
|
194
|
+
*/
|
|
195
|
+
export interface WSAckPayload {
|
|
196
|
+
messageId: string;
|
|
197
|
+
success: boolean;
|
|
198
|
+
reason?: string;
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* VaultysId challenge-response payload exchanged during authentication
|
|
202
|
+
*/
|
|
203
|
+
export interface WSAuthChallengePayload {
|
|
204
|
+
sessionId: string;
|
|
205
|
+
data: string;
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Sent by control plane when authentication succeeds
|
|
209
|
+
*/
|
|
210
|
+
export interface WSAuthCompletePayload {
|
|
211
|
+
agentId: string;
|
|
212
|
+
did: string;
|
|
213
|
+
/** Capabilities assigned by the control plane. Agent must use these. */
|
|
214
|
+
capabilities: string[];
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Sent by control plane when authentication fails
|
|
218
|
+
*/
|
|
219
|
+
export interface WSAuthFailedPayload {
|
|
220
|
+
reason: string;
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* Sent by agent when requesting registration (new agent)
|
|
224
|
+
*/
|
|
225
|
+
export interface WSRegisterRequestPayload {
|
|
226
|
+
name: string;
|
|
227
|
+
version?: string;
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Sent by control plane when registration is pending admin approval
|
|
231
|
+
*/
|
|
232
|
+
export interface WSRegistrationPendingPayload {
|
|
233
|
+
registrationId: string;
|
|
234
|
+
message: string;
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* Sent by control plane when admin approves a registration
|
|
238
|
+
*/
|
|
239
|
+
export interface WSRegistrationApprovedPayload {
|
|
240
|
+
registrationId: string;
|
|
241
|
+
capabilities: AgentCapability[];
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* Sent by control plane when admin rejects a registration
|
|
245
|
+
*/
|
|
246
|
+
export interface WSRegistrationRejectedPayload {
|
|
247
|
+
registrationId: string;
|
|
248
|
+
reason: string;
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* Sent by control plane when admin updates an agent's capabilities.
|
|
252
|
+
* Agent should initiate a new auth handshake to get a fresh certificate with
|
|
253
|
+
* the new capabilities (and any resource limits) embedded in the cert metadata.
|
|
254
|
+
*/
|
|
255
|
+
export interface WSUpdateCapabilitiesPayload {
|
|
256
|
+
capabilities: AgentCapability[];
|
|
257
|
+
/** Governance resource limits to embed in the new certificate. Null clears existing limits. */
|
|
258
|
+
resourceLimits?: ResourceLimits | null;
|
|
259
|
+
/** ID of the authorising governance policy. */
|
|
260
|
+
policyId?: string | null;
|
|
261
|
+
/** ISO-8601 expiry of the policy; agent rejects intents after this time. */
|
|
262
|
+
policyExpiresAt?: string | null;
|
|
263
|
+
reason?: string;
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* A single delegation certificate entry pushed to agents.
|
|
267
|
+
*/
|
|
268
|
+
export interface DelegationCertPayload {
|
|
269
|
+
id: string;
|
|
270
|
+
grantId: string;
|
|
271
|
+
userDid: string;
|
|
272
|
+
agentDid: string;
|
|
273
|
+
capabilities: AgentCapability[];
|
|
274
|
+
certificate: string;
|
|
275
|
+
expiresAt?: string;
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* Sent by control plane to push delegation certs to an agent.
|
|
279
|
+
* Replaces the full set for all affected users — agent stores them locally.
|
|
280
|
+
*/
|
|
281
|
+
export interface WSDelegationUpdatePayload {
|
|
282
|
+
delegations: DelegationCertPayload[];
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* Chat message exchanged between user and agent.
|
|
286
|
+
*/
|
|
287
|
+
export interface ChatMessageEntry {
|
|
288
|
+
role: "user" | "assistant";
|
|
289
|
+
content: string;
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* Sent by control plane to an agent to request a chat completion.
|
|
293
|
+
*/
|
|
294
|
+
export interface WSChatMessagePayload {
|
|
295
|
+
conversationId: string;
|
|
296
|
+
messages: ChatMessageEntry[];
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* Sent by agent back to control plane with streaming chat response chunks.
|
|
300
|
+
* - chunk: a text delta (one or more tokens)
|
|
301
|
+
* - done: true when the full response has been sent
|
|
302
|
+
* - error: set when the agent could not produce a response
|
|
303
|
+
*/
|
|
304
|
+
export interface WSChatResponsePayload {
|
|
305
|
+
conversationId: string;
|
|
306
|
+
chunk?: string;
|
|
307
|
+
/** True when this chunk is part of the model's internal reasoning (<think> block). */
|
|
308
|
+
thinking?: boolean;
|
|
309
|
+
done?: boolean;
|
|
310
|
+
error?: string;
|
|
311
|
+
/**
|
|
312
|
+
* Machine-readable error category sent alongside `error`.
|
|
313
|
+
* - "llm_unavailable": LLM endpoint is unreachable (ECONNREFUSED / network error)
|
|
314
|
+
* - "llm_error": LLM returned an API-level error (auth, quota, bad request…)
|
|
315
|
+
* - "agent_offline": Agent disconnected before responding (set by control plane)
|
|
316
|
+
*/
|
|
317
|
+
errorCode?: "llm_unavailable" | "llm_error" | "agent_offline";
|
|
318
|
+
}
|
|
319
|
+
/**
|
|
320
|
+
* Sent by agent to control plane when a tool needs admin approval before executing.
|
|
321
|
+
*/
|
|
322
|
+
export interface WSToolApprovalRequestPayload {
|
|
323
|
+
requestId: string;
|
|
324
|
+
conversationId?: string;
|
|
325
|
+
toolName: string;
|
|
326
|
+
args: Record<string, unknown>;
|
|
327
|
+
agentId?: string;
|
|
328
|
+
}
|
|
329
|
+
/**
|
|
330
|
+
* Sent by control plane to agent after admin approves or rejects a tool execution.
|
|
331
|
+
*/
|
|
332
|
+
export interface WSToolApprovalResponsePayload {
|
|
333
|
+
requestId: string;
|
|
334
|
+
approved: boolean;
|
|
335
|
+
reason?: string;
|
|
336
|
+
}
|
|
337
|
+
/**
|
|
338
|
+
* Sent by agent to control plane to report a tool execution (for real-time UI).
|
|
339
|
+
*/
|
|
340
|
+
export interface WSToolExecutionPayload {
|
|
341
|
+
conversationId?: string;
|
|
342
|
+
/** Set when the tool call originates from an intent execution (not a chat). */
|
|
343
|
+
intentId?: string;
|
|
344
|
+
toolName: string;
|
|
345
|
+
args: Record<string, unknown>;
|
|
346
|
+
result?: unknown;
|
|
347
|
+
error?: string;
|
|
348
|
+
approved?: boolean;
|
|
349
|
+
durationMs: number;
|
|
350
|
+
}
|
|
351
|
+
/**
|
|
352
|
+
* Sent by agent to control plane to post a message to a channel (e.g., responding to a mention).
|
|
353
|
+
*/
|
|
354
|
+
export interface WSChannelMessageSendPayload {
|
|
355
|
+
channelId: string;
|
|
356
|
+
threadId?: string;
|
|
357
|
+
content: string;
|
|
358
|
+
metadata?: Record<string, any>;
|
|
359
|
+
}
|
|
360
|
+
export type { VaultysIdentity as Identity, AgentPolicy as Policy, SignedIntent as Intent, ExecutionResult as Result, };
|
|
361
|
+
/**
|
|
362
|
+
* Sent by control plane to agent to enqueue a task.
|
|
363
|
+
*/
|
|
364
|
+
export interface WSTaskEnqueuePayload {
|
|
365
|
+
action: string;
|
|
366
|
+
params?: Record<string, unknown>;
|
|
367
|
+
/** 0 = normal, higher = more important. */
|
|
368
|
+
priority?: number;
|
|
369
|
+
/** ISO 8601 — defer execution until this time. */
|
|
370
|
+
scheduledAt?: string;
|
|
371
|
+
maxRetries?: number;
|
|
372
|
+
/** Who/what triggered the enqueue (user DID, etc.). */
|
|
373
|
+
createdBy?: string;
|
|
374
|
+
}
|
|
375
|
+
/**
|
|
376
|
+
* Sent by agent to control plane to report task progress.
|
|
377
|
+
*/
|
|
378
|
+
export interface WSTaskStatusPayload {
|
|
379
|
+
taskId: string;
|
|
380
|
+
status: "pending" | "running" | "success" | "failed" | "dead";
|
|
381
|
+
result?: unknown;
|
|
382
|
+
error?: string;
|
|
383
|
+
action: string;
|
|
384
|
+
retryCount: number;
|
|
385
|
+
}
|
|
386
|
+
/**
|
|
387
|
+
* Sent by control plane to agent to add or update a cron schedule.
|
|
388
|
+
*/
|
|
389
|
+
export interface WSScheduleUpdatePayload {
|
|
390
|
+
id: string;
|
|
391
|
+
name: string;
|
|
392
|
+
cron: string;
|
|
393
|
+
action: string;
|
|
394
|
+
params?: Record<string, unknown>;
|
|
395
|
+
enabled?: boolean;
|
|
396
|
+
}
|
|
397
|
+
/**
|
|
398
|
+
* Sent by control plane to agent to remove a schedule.
|
|
399
|
+
*/
|
|
400
|
+
export interface WSScheduleDeletePayload {
|
|
401
|
+
id: string;
|
|
402
|
+
}
|
|
403
|
+
/** Role a user holds within the organisation / realm hierarchy */
|
|
404
|
+
export type UserRole = "owner" | "admin" | "manager" | "operator" | "member";
|
|
405
|
+
export interface Realm {
|
|
406
|
+
id: string;
|
|
407
|
+
name: string;
|
|
408
|
+
slug: string;
|
|
409
|
+
description: string | null;
|
|
410
|
+
color: string;
|
|
411
|
+
isDefault: boolean;
|
|
412
|
+
createdAt: string;
|
|
413
|
+
}
|
|
414
|
+
export interface RealmMembership {
|
|
415
|
+
realmId: string;
|
|
416
|
+
realmName: string;
|
|
417
|
+
realmSlug: string;
|
|
418
|
+
realmColor: string;
|
|
419
|
+
isPrimary: boolean;
|
|
420
|
+
}
|
|
421
|
+
export interface RealmConfig {
|
|
422
|
+
realmId: string;
|
|
423
|
+
llmConfig?: import("./types").LlmConfig;
|
|
424
|
+
defaultCapabilities?: import("./types").AgentCapability[];
|
|
425
|
+
}
|
|
426
|
+
export interface RealmSkill {
|
|
427
|
+
id: string;
|
|
428
|
+
realmId: string;
|
|
429
|
+
name: string;
|
|
430
|
+
description: string | null;
|
|
431
|
+
version: string | null;
|
|
432
|
+
isRequired: boolean;
|
|
433
|
+
config: Record<string, unknown>;
|
|
434
|
+
createdAt: string;
|
|
435
|
+
}
|
|
436
|
+
export interface AgentSkillOverride {
|
|
437
|
+
agentDid: string;
|
|
438
|
+
realmSkillId: string;
|
|
439
|
+
enabled: boolean;
|
|
440
|
+
}
|
|
441
|
+
/** Effective skill entry delivered to an agent via skills_config. */
|
|
442
|
+
export interface SkillConfig {
|
|
443
|
+
name: string;
|
|
444
|
+
enabled: boolean;
|
|
445
|
+
isRequired: boolean;
|
|
446
|
+
config: Record<string, unknown>;
|
|
447
|
+
/** Markdown instructions injected into the agent's system prompt when the skill is enabled. */
|
|
448
|
+
content?: string;
|
|
449
|
+
/** Underlying RealmSkill row id — used by admin UIs to toggle the per-agent override. */
|
|
450
|
+
realmSkillId?: string;
|
|
451
|
+
}
|
|
452
|
+
/** Pushed by control plane to configure which skills the agent should activate. */
|
|
453
|
+
export interface WSSkillsConfigPayload {
|
|
454
|
+
skills: SkillConfig[];
|
|
455
|
+
}
|
|
456
|
+
export type GraphNodeType = "realm" | "user" | "agent";
|
|
457
|
+
export interface GraphNode {
|
|
458
|
+
id: string;
|
|
459
|
+
label: string;
|
|
460
|
+
type: GraphNodeType;
|
|
461
|
+
role?: UserRole;
|
|
462
|
+
color?: string;
|
|
463
|
+
isOnline?: boolean;
|
|
464
|
+
}
|
|
465
|
+
export type GraphEdgeType = "realm_member" | "grant" | "reports_to" | "delegation" | "peer";
|
|
466
|
+
export interface GraphEdge {
|
|
467
|
+
source: string;
|
|
468
|
+
target: string;
|
|
469
|
+
type: GraphEdgeType;
|
|
470
|
+
label?: string;
|
|
471
|
+
capabilities?: AgentCapability[];
|
|
472
|
+
}
|
|
473
|
+
export interface GraphData {
|
|
474
|
+
nodes: GraphNode[];
|
|
475
|
+
edges: GraphEdge[];
|
|
476
|
+
}
|
|
477
|
+
export interface ChatSession {
|
|
478
|
+
id: string;
|
|
479
|
+
title: string | null;
|
|
480
|
+
source: string;
|
|
481
|
+
createdAt: string;
|
|
482
|
+
updatedAt: string;
|
|
483
|
+
messageCount: number;
|
|
484
|
+
}
|
|
485
|
+
export interface ChatHistoryMessage {
|
|
486
|
+
id: number;
|
|
487
|
+
role: string;
|
|
488
|
+
content: string;
|
|
489
|
+
toolCalls?: unknown;
|
|
490
|
+
createdAt: string;
|
|
491
|
+
}
|
|
492
|
+
/** Sent by control plane to request the agent's session list. */
|
|
493
|
+
export interface WSGetChatSessionsPayload {
|
|
494
|
+
limit?: number;
|
|
495
|
+
}
|
|
496
|
+
/** Sent by agent in response with its list of sessions. */
|
|
497
|
+
export interface WSChatSessionsResponsePayload {
|
|
498
|
+
sessions: ChatSession[];
|
|
499
|
+
}
|
|
500
|
+
/** Sent by control plane to request full message history for one session. */
|
|
501
|
+
export interface WSGetChatHistoryPayload {
|
|
502
|
+
sessionId: string;
|
|
503
|
+
}
|
|
504
|
+
/** Sent by agent in response with the session's messages. */
|
|
505
|
+
export interface WSChatHistoryResponsePayload {
|
|
506
|
+
sessionId: string;
|
|
507
|
+
messages: ChatHistoryMessage[];
|
|
508
|
+
}
|
|
509
|
+
/**
|
|
510
|
+
* A peer grant authorises one agent (sourceDid) to invoke a remote agent
|
|
511
|
+
* (targetDid) as an LLM tool. The certificate is signed by the control
|
|
512
|
+
* plane so both sides can verify it without a network round-trip.
|
|
513
|
+
*/
|
|
514
|
+
export interface AgentPeerGrant {
|
|
515
|
+
/** Unique grant identifier. */
|
|
516
|
+
id: string;
|
|
517
|
+
/** DID of the agent that is allowed to call the remote agent. */
|
|
518
|
+
sourceDid: string;
|
|
519
|
+
/** DID of the remote agent to be called. */
|
|
520
|
+
targetDid: string;
|
|
521
|
+
/** Human-readable name for the remote agent (used as tool name suffix). */
|
|
522
|
+
targetName: string;
|
|
523
|
+
/**
|
|
524
|
+
* Description of what the remote agent can do. Written by the control
|
|
525
|
+
* plane admin and used verbatim as the LLM tool description.
|
|
526
|
+
*/
|
|
527
|
+
skillDescription: string;
|
|
528
|
+
/** Capabilities the calling agent is allowed to request from the remote. */
|
|
529
|
+
capabilities: string[];
|
|
530
|
+
/** Base64 control-plane-signed certificate blob. */
|
|
531
|
+
certificate: string;
|
|
532
|
+
/** ISO 8601 expiry timestamp, omitted when the grant never expires. */
|
|
533
|
+
expiresAt?: string;
|
|
534
|
+
/**
|
|
535
|
+
* Optional shared VaultysClaw channel ID for channel-based agent-to-agent invocation.
|
|
536
|
+
* When set, the calling agent can post @mentions to this channel instead of using
|
|
537
|
+
* the WebRTC PeerManager. Falls back to WebRTC when absent.
|
|
538
|
+
*/
|
|
539
|
+
channelId?: string;
|
|
540
|
+
}
|
|
541
|
+
/**
|
|
542
|
+
* Sent by the control plane to push the complete set of peer grants for an
|
|
543
|
+
* agent. Replaces whatever the agent has stored locally.
|
|
544
|
+
*/
|
|
545
|
+
export interface WSAgentPeerCatalogPayload {
|
|
546
|
+
peers: AgentPeerGrant[];
|
|
547
|
+
}
|
|
548
|
+
export interface VaultysIDInfo {
|
|
549
|
+
did: string;
|
|
550
|
+
fingerprint: string;
|
|
551
|
+
version: number;
|
|
552
|
+
type: string;
|
|
553
|
+
}
|
|
554
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,eAAe,GAAG,kBAAkB,CAAC;IAC3C,SAAS,EAAE,IAAI,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,MAAM,eAAe,GACvB,aAAa,GACb,iBAAiB,GACjB,iBAAiB,GACjB,UAAU,GACV,WAAW,GACX,gBAAgB,GA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;IACtC,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,6DAA6D;AAC7D,MAAM,WAAW,4BAA4B;IAC3C,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,kBAAkB,EAAE,CAAC;CAChC;AAMD;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,+BAA+B;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,iEAAiE;IACjE,SAAS,EAAE,MAAM,CAAC;IAClB,4CAA4C;IAC5C,SAAS,EAAE,MAAM,CAAC;IAClB,2EAA2E;IAC3E,UAAU,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,gBAAgB,EAAE,MAAM,CAAC;IACzB,4EAA4E;IAC5E,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,oDAAoD;IACpD,WAAW,EAAE,MAAM,CAAC;IACpB,uEAAuE;IACvE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,MAAM,WAAW,yBAAyB;IACxC,KAAK,EAAE,cAAc,EAAE,CAAC;CACzB;AAED,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CACd"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Color mappings for status, log levels, and other semantic indicators.
|
|
3
|
+
* Used by both web UI (Tailwind classes) and TUI (terminal colors).
|
|
4
|
+
*/
|
|
5
|
+
/** Agent/connection status to color mapping */
|
|
6
|
+
export declare const STATUS_COLORS: {
|
|
7
|
+
readonly connected: "green";
|
|
8
|
+
readonly connecting: "yellow";
|
|
9
|
+
readonly pending_approval: "cyan";
|
|
10
|
+
readonly disconnected: "red";
|
|
11
|
+
readonly initializing: "gray";
|
|
12
|
+
readonly error: "red";
|
|
13
|
+
readonly success: "green";
|
|
14
|
+
readonly warning: "yellow";
|
|
15
|
+
readonly pending: "yellow";
|
|
16
|
+
readonly failed: "red";
|
|
17
|
+
};
|
|
18
|
+
/** Log level to color mapping */
|
|
19
|
+
export declare const LOG_LEVEL_COLORS: {
|
|
20
|
+
readonly error: "red";
|
|
21
|
+
readonly warn: "yellow";
|
|
22
|
+
readonly warning: "yellow";
|
|
23
|
+
readonly info: "white";
|
|
24
|
+
readonly debug: "gray";
|
|
25
|
+
readonly log: "white";
|
|
26
|
+
};
|
|
27
|
+
/** Tailwind CSS color classes for status */
|
|
28
|
+
export declare const STATUS_TAILWIND: {
|
|
29
|
+
readonly connected: "text-green-600";
|
|
30
|
+
readonly connecting: "text-yellow-600";
|
|
31
|
+
readonly pending_approval: "text-cyan-600";
|
|
32
|
+
readonly disconnected: "text-red-600";
|
|
33
|
+
readonly initializing: "text-gray-600";
|
|
34
|
+
readonly error: "text-red-600";
|
|
35
|
+
readonly success: "text-green-600";
|
|
36
|
+
readonly warning: "text-yellow-600";
|
|
37
|
+
readonly pending: "text-yellow-600";
|
|
38
|
+
readonly failed: "text-red-600";
|
|
39
|
+
};
|
|
40
|
+
/** Tailwind CSS background color classes for badges */
|
|
41
|
+
export declare const BADGE_COLORS: {
|
|
42
|
+
readonly success: "bg-green-100 text-green-800";
|
|
43
|
+
readonly error: "bg-red-100 text-red-800";
|
|
44
|
+
readonly warning: "bg-yellow-100 text-yellow-800";
|
|
45
|
+
readonly info: "bg-blue-100 text-blue-800";
|
|
46
|
+
readonly neutral: "bg-gray-100 text-gray-800";
|
|
47
|
+
};
|
|
48
|
+
/** Get terminal color for status (TUI) */
|
|
49
|
+
export declare function getStatusColor(status: string): string;
|
|
50
|
+
/** Get terminal color for log level (TUI) */
|
|
51
|
+
export declare function getLogLevelColor(level: string): string;
|
|
52
|
+
/** Get Tailwind class for status */
|
|
53
|
+
export declare function getStatusTailwindClass(status: string): string;
|
|
54
|
+
/** Get Tailwind class for badge */
|
|
55
|
+
export declare function getBadgeColorClass(type: "success" | "error" | "warning" | "info" | "neutral"): string;
|
|
56
|
+
/** Map status to background color class (Tailwind) */
|
|
57
|
+
export declare const STATUS_BG_COLORS: {
|
|
58
|
+
readonly connected: "bg-green-50";
|
|
59
|
+
readonly connecting: "bg-yellow-50";
|
|
60
|
+
readonly pending_approval: "bg-cyan-50";
|
|
61
|
+
readonly disconnected: "bg-red-50";
|
|
62
|
+
readonly initializing: "bg-gray-50";
|
|
63
|
+
readonly error: "bg-red-50";
|
|
64
|
+
readonly success: "bg-green-50";
|
|
65
|
+
readonly warning: "bg-yellow-50";
|
|
66
|
+
readonly pending: "bg-yellow-50";
|
|
67
|
+
readonly failed: "bg-red-50";
|
|
68
|
+
};
|
|
69
|
+
/** Get background color class for status */
|
|
70
|
+
export declare function getStatusBgClass(status: string): string;
|
|
71
|
+
/** Common emoji reactions */
|
|
72
|
+
export declare const COMMON_EMOJIS: readonly ["👍", "❤️", "😂", "🎉", "🔥", "👀", "😮", "😢"];
|
|
73
|
+
//# sourceMappingURL=colors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../src/utils/colors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,+CAA+C;AAC/C,eAAO,MAAM,aAAa;;;;;;;;;;;CAWhB,CAAC;AAEX,iCAAiC;AACjC,eAAO,MAAM,gBAAgB;;;;;;;CAOnB,CAAC;AAEX,4CAA4C;AAC5C,eAAO,MAAM,eAAe;;;;;;;;;;;CAWlB,CAAC;AAEX,uDAAuD;AACvD,eAAO,MAAM,YAAY;;;;;;CAMf,CAAC;AAEX,0CAA0C;AAC1C,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAErD;AAED,6CAA6C;AAC7C,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED,oCAAoC;AACpC,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAI7D;AAED,mCAAmC;AACnC,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,GACzD,MAAM,CAER;AAED,sDAAsD;AACtD,eAAO,MAAM,gBAAgB;;;;;;;;;;;CAWnB,CAAC;AAEX,4CAA4C;AAC5C,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAIvD;AAED,6BAA6B;AAC7B,eAAO,MAAM,aAAa,2DAShB,CAAC"}
|