@hermespilot/link 0.2.3 → 0.2.5
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/dist/{chunk-HIQBCPY4.js → chunk-N4CZ2ASZ.js} +3292 -2203
- package/dist/cli/index.js +1 -2
- package/dist/http/app.d.ts +41 -0
- package/dist/http/app.js +1 -2
- package/package.json +2 -2
- package/dist/chunk-HIQBCPY4.js.map +0 -1
- package/dist/cli/index.js.map +0 -1
- package/dist/http/app.js.map +0 -1
package/dist/cli/index.js
CHANGED
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
startDaemonProcess,
|
|
27
27
|
startLinkService,
|
|
28
28
|
stopDaemonProcess
|
|
29
|
-
} from "../chunk-
|
|
29
|
+
} from "../chunk-N4CZ2ASZ.js";
|
|
30
30
|
|
|
31
31
|
// src/cli/index.ts
|
|
32
32
|
import { Command } from "commander";
|
|
@@ -843,4 +843,3 @@ async function waitForPairingOrShutdown(sessionId, paths) {
|
|
|
843
843
|
function sleep(ms) {
|
|
844
844
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
845
845
|
}
|
|
846
|
-
//# sourceMappingURL=index.js.map
|
package/dist/http/app.d.ts
CHANGED
|
@@ -153,6 +153,27 @@ interface LinkMessageAgentEvent {
|
|
|
153
153
|
payload: unknown;
|
|
154
154
|
};
|
|
155
155
|
}
|
|
156
|
+
type LinkApprovalDecisionScope = 'once' | 'session' | 'always';
|
|
157
|
+
type LinkApprovalDecision = LinkApprovalDecisionScope | 'deny';
|
|
158
|
+
type LinkApprovalStatus = 'pending' | 'approved' | 'denied' | 'expired';
|
|
159
|
+
interface LinkApprovalRequest {
|
|
160
|
+
id: string;
|
|
161
|
+
status: LinkApprovalStatus;
|
|
162
|
+
kind: 'terminal_command';
|
|
163
|
+
command: string;
|
|
164
|
+
description?: string;
|
|
165
|
+
pattern_key?: string;
|
|
166
|
+
pattern_keys?: string[];
|
|
167
|
+
choices: LinkApprovalDecision[];
|
|
168
|
+
created_at: string;
|
|
169
|
+
resolved_at?: string;
|
|
170
|
+
decision?: LinkApprovalDecision;
|
|
171
|
+
resume_available: boolean;
|
|
172
|
+
resolution_hint?: string;
|
|
173
|
+
resolution_hint_zh?: string;
|
|
174
|
+
resolution_hint_en?: string;
|
|
175
|
+
config_path?: string;
|
|
176
|
+
}
|
|
156
177
|
interface LinkMessage {
|
|
157
178
|
id: string;
|
|
158
179
|
schema_version: 1;
|
|
@@ -173,6 +194,7 @@ interface LinkMessage {
|
|
|
173
194
|
parts: LinkMessagePart[];
|
|
174
195
|
attachments: unknown[];
|
|
175
196
|
agent_events?: LinkMessageAgentEvent[];
|
|
197
|
+
approvals?: LinkApprovalRequest[];
|
|
176
198
|
hermes?: Record<string, unknown>;
|
|
177
199
|
raw?: {
|
|
178
200
|
format: string;
|
|
@@ -211,6 +233,8 @@ interface LinkRun {
|
|
|
211
233
|
id: string;
|
|
212
234
|
kind?: 'agent' | 'command';
|
|
213
235
|
hermes_run_id?: string;
|
|
236
|
+
hermes_response_id?: string;
|
|
237
|
+
previous_response_id?: string;
|
|
214
238
|
conversation_id: string;
|
|
215
239
|
trigger_message_id: string;
|
|
216
240
|
assistant_message_id: string;
|
|
@@ -348,6 +372,23 @@ declare class ConversationService {
|
|
|
348
372
|
sendMessage(input: SendMessageInput): Promise<SendMessageResult>;
|
|
349
373
|
cancelRun(conversationId: string, runId: string): Promise<CancelRunResult>;
|
|
350
374
|
cancelRunById(runId: string): Promise<CancelRunResult>;
|
|
375
|
+
resolveApproval(input: {
|
|
376
|
+
conversationId: string;
|
|
377
|
+
approvalId: string;
|
|
378
|
+
decision: LinkApprovalDecision;
|
|
379
|
+
}): Promise<{
|
|
380
|
+
conversation_id: string;
|
|
381
|
+
message_id: string;
|
|
382
|
+
approval: LinkApprovalRequest;
|
|
383
|
+
command_allowlist_updated: boolean;
|
|
384
|
+
config_path?: string;
|
|
385
|
+
requires_gateway_reload: boolean;
|
|
386
|
+
gateway_reloaded?: boolean;
|
|
387
|
+
reload_error?: string;
|
|
388
|
+
restart_hint?: string;
|
|
389
|
+
resume_available: boolean;
|
|
390
|
+
last_event_seq: number;
|
|
391
|
+
}>;
|
|
351
392
|
deleteConversation(conversationId: string): Promise<DeleteConversationResult>;
|
|
352
393
|
deleteConversations(conversationIds: string[]): Promise<{
|
|
353
394
|
deleted_count: number;
|
package/dist/http/app.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hermespilot/link",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.5",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Hermes Link companion service and CLI for connecting hermes-agent through HermesPilot",
|
|
6
6
|
"license": "MIT",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"access": "public"
|
|
28
28
|
},
|
|
29
29
|
"scripts": {
|
|
30
|
-
"build": "tsup src/cli/index.ts src/http/app.ts --format esm --target node22 --dts --
|
|
30
|
+
"build": "tsup src/cli/index.ts src/http/app.ts --format esm --target node22 --dts --clean",
|
|
31
31
|
"check": "tsc --noEmit",
|
|
32
32
|
"dev": "tsx src/cli/index.ts",
|
|
33
33
|
"preinstall": "node ./scripts/check-node-version.mjs",
|