nexus-agentd 0.1.0 → 0.1.6
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 +22 -0
- package/README.md +351 -179
- package/dist/a2a/runtime.d.ts +30 -0
- package/dist/a2a/runtime.js +374 -0
- package/dist/acp/runtime.d.ts +12 -3
- package/dist/acp/runtime.js +248 -17
- package/dist/artifact-store.d.ts +41 -0
- package/dist/artifact-store.js +340 -0
- package/dist/auth.d.ts +13 -0
- package/dist/auth.js +77 -0
- package/dist/cli.js +58 -1
- package/dist/config.d.ts +10 -0
- package/dist/config.js +281 -53
- package/dist/control-plane.d.ts +91 -0
- package/dist/control-plane.js +629 -0
- package/dist/drivers/hermes.d.ts +2 -0
- package/dist/drivers/hermes.js +10 -0
- package/dist/drivers/index.js +6 -0
- package/dist/events.js +13 -2
- package/dist/index.d.ts +6 -0
- package/dist/index.js +15 -3
- package/dist/run-store.d.ts +49 -0
- package/dist/run-store.js +291 -0
- package/dist/server.d.ts +3 -2
- package/dist/server.js +911 -41
- package/dist/session-contract.d.ts +16 -4
- package/dist/session.d.ts +74 -8
- package/dist/session.js +433 -38
- package/dist/types.d.ts +193 -6
- package/dist/types.js +2 -1
- package/dist/webui/app.d.ts +1 -0
- package/dist/webui/app.js +1072 -0
- package/dist/webui/icons.d.ts +9 -0
- package/dist/webui/icons.js +10 -0
- package/dist/webui/index.d.ts +3 -0
- package/dist/webui/index.js +32 -0
- package/dist/webui/markup.d.ts +1 -0
- package/dist/webui/markup.js +68 -0
- package/dist/webui/styles.d.ts +1 -0
- package/dist/webui/styles.js +269 -0
- package/dist/workspace-files.d.ts +48 -0
- package/dist/workspace-files.js +269 -0
- package/nexus-agentd.example.json +30 -27
- package/package.json +6 -6
package/dist/types.d.ts
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
export type AgentdSessionState = 'created' | 'running' | 'input_required' | 'permission_required' | 'completed' | 'failed' | 'canceled';
|
|
2
|
+
export type AgentdProtocol = 'acp' | 'a2a';
|
|
2
3
|
export type PermissionPolicy = 'ask' | 'deny';
|
|
3
|
-
export declare const agentdDriverKinds: readonly ["opencode", "claude", "codex", "pi", "openclaw"];
|
|
4
|
+
export declare const agentdDriverKinds: readonly ["opencode", "claude", "codex", "pi", "openclaw", "hermes"];
|
|
4
5
|
export type AgentdDriverKind = (typeof agentdDriverKinds)[number];
|
|
5
6
|
export interface AgentdDriverConfig {
|
|
7
|
+
protocol?: 'acp';
|
|
6
8
|
driver: AgentdDriverKind;
|
|
7
9
|
name?: string;
|
|
8
10
|
description?: string;
|
|
9
11
|
enabled?: boolean;
|
|
12
|
+
workspace?: string;
|
|
10
13
|
command?: string;
|
|
11
14
|
args?: string[];
|
|
12
15
|
inheritEnv?: string[];
|
|
@@ -14,27 +17,165 @@ export interface AgentdDriverConfig {
|
|
|
14
17
|
permissionPolicy?: PermissionPolicy;
|
|
15
18
|
permissionTimeoutMs?: number;
|
|
16
19
|
}
|
|
20
|
+
export type A2AAuthType = 'none' | 'bearer' | 'header';
|
|
21
|
+
export type A2ATransportPreference = 'auto' | 'jsonrpc' | 'http-json';
|
|
22
|
+
export interface AgentdA2AConfig {
|
|
23
|
+
protocol: 'a2a';
|
|
24
|
+
name?: string;
|
|
25
|
+
description?: string;
|
|
26
|
+
enabled?: boolean;
|
|
27
|
+
/** Full Agent Card JSON URL. Preferred for new configurations. */
|
|
28
|
+
agentCardUrl?: string;
|
|
29
|
+
/** @deprecated Legacy service root used for well-known Agent Card discovery. */
|
|
30
|
+
agentUrl?: string;
|
|
31
|
+
preferredTransport?: A2ATransportPreference;
|
|
32
|
+
auth?: {
|
|
33
|
+
type: A2AAuthType;
|
|
34
|
+
value?: string;
|
|
35
|
+
headerName?: string;
|
|
36
|
+
};
|
|
37
|
+
timeoutMs?: number;
|
|
38
|
+
}
|
|
39
|
+
export type AgentdAgentConfig = AgentdDriverConfig | AgentdA2AConfig;
|
|
40
|
+
export interface AgentdApiKeyScope {
|
|
41
|
+
allAgents: boolean;
|
|
42
|
+
agentIds: string[];
|
|
43
|
+
}
|
|
44
|
+
export interface AgentdApiKeyConfig {
|
|
45
|
+
id: string;
|
|
46
|
+
name: string;
|
|
47
|
+
secret: string;
|
|
48
|
+
enabled: boolean;
|
|
49
|
+
scope: AgentdApiKeyScope;
|
|
50
|
+
createdAt: number;
|
|
51
|
+
lastUsedAt?: number;
|
|
52
|
+
}
|
|
17
53
|
export interface AgentdConfig {
|
|
18
54
|
listen: {
|
|
19
55
|
host: string;
|
|
20
56
|
port: number;
|
|
21
57
|
};
|
|
22
|
-
|
|
58
|
+
initialized: boolean;
|
|
59
|
+
/** Legacy data-plane credential. Loaded as an all-agents API key. */
|
|
60
|
+
authToken?: string;
|
|
61
|
+
adminPasswordHash?: string;
|
|
62
|
+
apiKeys?: AgentdApiKeyConfig[];
|
|
23
63
|
workspaceRoots: string[];
|
|
24
64
|
maxRequestBytes: number;
|
|
65
|
+
maxAttachmentBytes?: number;
|
|
66
|
+
/** Gateway-owned directory for temporary, anonymously downloadable artifacts. */
|
|
67
|
+
artifactStoragePath?: string;
|
|
68
|
+
/** Maximum size of one published artifact. */
|
|
69
|
+
maxArtifactBytes?: number;
|
|
70
|
+
/** Maximum combined size of all retained published artifacts. */
|
|
71
|
+
maxArtifactStorageBytes?: number;
|
|
72
|
+
/** Maximum number of retained published artifacts. */
|
|
73
|
+
maxPublishedArtifacts?: number;
|
|
74
|
+
/** Maximum number of simultaneous artifact copies. */
|
|
75
|
+
maxConcurrentArtifactPublishes?: number;
|
|
76
|
+
/** Lifetime of a published artifact URL. */
|
|
77
|
+
artifactTtlMs?: number;
|
|
25
78
|
maxEventsPerSession: number;
|
|
26
79
|
maxOutputChars: number;
|
|
27
80
|
sessionTtlMs: number;
|
|
28
|
-
|
|
81
|
+
cleanupIntervalMs?: number;
|
|
82
|
+
requestTimeoutMs?: number;
|
|
83
|
+
promptTimeoutMs?: number;
|
|
84
|
+
maxSessions?: number;
|
|
85
|
+
maxSseConnections?: number;
|
|
86
|
+
maxConnections?: number;
|
|
87
|
+
adminSessionTtlMs?: number;
|
|
88
|
+
secureAdminCookies?: boolean;
|
|
89
|
+
agents: Record<string, AgentdAgentConfig>;
|
|
90
|
+
}
|
|
91
|
+
export interface AgentdFileRootView {
|
|
92
|
+
id: string;
|
|
93
|
+
name: string;
|
|
94
|
+
path: string;
|
|
95
|
+
}
|
|
96
|
+
export interface AgentdFileEntryView {
|
|
97
|
+
name: string;
|
|
98
|
+
path: string;
|
|
99
|
+
type: 'file' | 'directory' | 'symlink' | 'other';
|
|
100
|
+
size?: number;
|
|
101
|
+
modifiedAt: number;
|
|
102
|
+
}
|
|
103
|
+
export interface AgentdPublishedFile {
|
|
104
|
+
id: string;
|
|
105
|
+
name: string;
|
|
106
|
+
url: string;
|
|
107
|
+
size: number;
|
|
108
|
+
mediaType: string;
|
|
109
|
+
sha256: string;
|
|
110
|
+
expiresAt: number;
|
|
29
111
|
}
|
|
30
112
|
export interface AgentdAgentView {
|
|
31
113
|
id: string;
|
|
32
114
|
name: string;
|
|
33
115
|
description?: string;
|
|
34
|
-
protocol:
|
|
116
|
+
protocol: AgentdProtocol;
|
|
117
|
+
driver?: AgentdDriverKind;
|
|
35
118
|
ready: boolean;
|
|
119
|
+
enabled?: boolean;
|
|
120
|
+
workspace?: string;
|
|
36
121
|
version?: string;
|
|
37
122
|
error?: string;
|
|
123
|
+
checkedAt?: number;
|
|
124
|
+
responseMs?: number;
|
|
125
|
+
}
|
|
126
|
+
export interface AgentdAgentConfigView {
|
|
127
|
+
id: string;
|
|
128
|
+
protocol: AgentdProtocol;
|
|
129
|
+
name: string;
|
|
130
|
+
description?: string;
|
|
131
|
+
enabled: boolean;
|
|
132
|
+
driver?: AgentdDriverKind;
|
|
133
|
+
workspace?: string;
|
|
134
|
+
permissionPolicy?: PermissionPolicy;
|
|
135
|
+
permissionTimeoutMs?: number;
|
|
136
|
+
agentCardUrl?: string;
|
|
137
|
+
agentUrl?: string;
|
|
138
|
+
preferredTransport?: A2ATransportPreference;
|
|
139
|
+
auth?: {
|
|
140
|
+
type: A2AAuthType;
|
|
141
|
+
headerName?: string;
|
|
142
|
+
configured: boolean;
|
|
143
|
+
};
|
|
144
|
+
timeoutMs?: number;
|
|
145
|
+
}
|
|
146
|
+
export interface AgentdControlPlaneView {
|
|
147
|
+
workspaceRoots: string[];
|
|
148
|
+
driverKinds: AgentdDriverKind[];
|
|
149
|
+
sessionTtlMs: number;
|
|
150
|
+
promptTimeoutMs: number;
|
|
151
|
+
cleanupIntervalMs: number;
|
|
152
|
+
agents: AgentdAgentConfigView[];
|
|
153
|
+
}
|
|
154
|
+
export interface AgentdInputAttachmentView {
|
|
155
|
+
id: string;
|
|
156
|
+
name: string;
|
|
157
|
+
mediaType?: string;
|
|
158
|
+
size: number;
|
|
159
|
+
}
|
|
160
|
+
export interface AgentdInputAttachment {
|
|
161
|
+
id: string;
|
|
162
|
+
name: string;
|
|
163
|
+
mediaType?: string;
|
|
164
|
+
bytes: Buffer;
|
|
165
|
+
}
|
|
166
|
+
export interface AgentdApiKeyView {
|
|
167
|
+
id: string;
|
|
168
|
+
name: string;
|
|
169
|
+
enabled: boolean;
|
|
170
|
+
scope: AgentdApiKeyScope;
|
|
171
|
+
suffix: string;
|
|
172
|
+
createdAt: number;
|
|
173
|
+
lastUsedAt?: number;
|
|
174
|
+
legacy: boolean;
|
|
175
|
+
}
|
|
176
|
+
export interface AgentdApiKeyPrincipal {
|
|
177
|
+
id: string;
|
|
178
|
+
scope: AgentdApiKeyScope;
|
|
38
179
|
}
|
|
39
180
|
export interface AgentdPendingRequest {
|
|
40
181
|
id: string;
|
|
@@ -54,23 +195,69 @@ export interface AgentdArtifact {
|
|
|
54
195
|
url?: string;
|
|
55
196
|
filename?: string;
|
|
56
197
|
mediaType?: string;
|
|
198
|
+
data?: unknown;
|
|
199
|
+
bytesBase64?: string;
|
|
57
200
|
metadata?: Record<string, unknown>;
|
|
58
201
|
}
|
|
59
202
|
export interface AgentdSessionView {
|
|
60
203
|
id: string;
|
|
204
|
+
runId?: string;
|
|
205
|
+
protocol: AgentdProtocol;
|
|
206
|
+
protocolSessionId?: string;
|
|
207
|
+
/** Backward-compatible alias for ACP clients. */
|
|
61
208
|
acpSessionId?: string;
|
|
62
209
|
agentId: string;
|
|
63
|
-
workspace
|
|
210
|
+
workspace?: string;
|
|
64
211
|
state: AgentdSessionState;
|
|
65
212
|
output?: string;
|
|
66
213
|
error?: string;
|
|
67
214
|
artifacts: AgentdArtifact[];
|
|
215
|
+
inputAttachments?: AgentdInputAttachmentView[];
|
|
68
216
|
pendingRequest?: AgentdPendingRequest;
|
|
69
217
|
lastEventId?: string;
|
|
70
218
|
createdAt: number;
|
|
71
219
|
updatedAt: number;
|
|
72
220
|
}
|
|
73
|
-
export
|
|
221
|
+
export interface AgentdRunProgress {
|
|
222
|
+
phase: string;
|
|
223
|
+
message?: string;
|
|
224
|
+
percent?: number;
|
|
225
|
+
}
|
|
226
|
+
export interface AgentdRunArtifactView {
|
|
227
|
+
id?: string;
|
|
228
|
+
name?: string;
|
|
229
|
+
description?: string;
|
|
230
|
+
url?: string;
|
|
231
|
+
filename?: string;
|
|
232
|
+
mediaType?: string;
|
|
233
|
+
metadata?: Record<string, unknown>;
|
|
234
|
+
}
|
|
235
|
+
export interface AgentdRunView {
|
|
236
|
+
id: string;
|
|
237
|
+
sessionId: string;
|
|
238
|
+
agentId: string;
|
|
239
|
+
agentName: string;
|
|
240
|
+
protocol: AgentdProtocol;
|
|
241
|
+
workspace?: string;
|
|
242
|
+
protocolSessionId?: string;
|
|
243
|
+
task: string;
|
|
244
|
+
taskTruncated?: boolean;
|
|
245
|
+
state: AgentdSessionState;
|
|
246
|
+
progress: AgentdRunProgress;
|
|
247
|
+
resultSummary?: string;
|
|
248
|
+
error?: string;
|
|
249
|
+
artifactCount: number;
|
|
250
|
+
inputAttachmentCount?: number;
|
|
251
|
+
startedAt: number;
|
|
252
|
+
updatedAt: number;
|
|
253
|
+
endedAt?: number;
|
|
254
|
+
durationMs?: number;
|
|
255
|
+
}
|
|
256
|
+
export interface AgentdRunDetail extends AgentdRunView {
|
|
257
|
+
output?: string;
|
|
258
|
+
artifacts: AgentdRunArtifactView[];
|
|
259
|
+
}
|
|
260
|
+
export type AgentdEventType = 'session_state' | 'assistant_chunk' | 'thought_chunk' | 'plan' | 'tool_call' | 'tool_update' | 'terminal_output' | 'file_activity' | 'artifact' | 'permission_required' | 'input_required' | 'completed' | 'failed' | 'canceled';
|
|
74
261
|
export interface AgentdEvent {
|
|
75
262
|
id: string;
|
|
76
263
|
sessionId: string;
|
package/dist/types.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const app: string;
|