@hermespilot/link 0.5.0 → 0.5.2
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 +8 -2
- package/dist/{chunk-VIBGAYU2.js → chunk-DZMN5RIV.js} +2591 -2252
- package/dist/cli/index.js +1508 -41
- package/dist/http/app.d.ts +53 -1
- package/dist/http/app.js +1 -1
- package/package.json +1 -1
- package/scripts/postinstall.mjs +6 -0
package/dist/http/app.d.ts
CHANGED
|
@@ -173,6 +173,14 @@ interface DeleteConversationResult {
|
|
|
173
173
|
hermes_session_ids?: string[];
|
|
174
174
|
deleted_at: string;
|
|
175
175
|
}
|
|
176
|
+
interface ArchiveConversationResult {
|
|
177
|
+
conversation_id: string;
|
|
178
|
+
archived_at: string;
|
|
179
|
+
}
|
|
180
|
+
interface UnarchiveConversationResult {
|
|
181
|
+
conversation_id: string;
|
|
182
|
+
unarchived_at: string;
|
|
183
|
+
}
|
|
176
184
|
interface BulkDeleteConversationResult {
|
|
177
185
|
conversation_id: string;
|
|
178
186
|
status: 'deleted' | 'failed';
|
|
@@ -184,10 +192,21 @@ interface BulkDeleteConversationResult {
|
|
|
184
192
|
message: string;
|
|
185
193
|
};
|
|
186
194
|
}
|
|
195
|
+
interface BulkArchiveConversationResult {
|
|
196
|
+
conversation_id: string;
|
|
197
|
+
status: 'archived' | 'failed';
|
|
198
|
+
archived_at?: string;
|
|
199
|
+
error?: {
|
|
200
|
+
code: string;
|
|
201
|
+
message: string;
|
|
202
|
+
};
|
|
203
|
+
}
|
|
187
204
|
type ConversationClearPlanStatus = 'prepared' | 'executing' | 'completed' | 'failed';
|
|
205
|
+
type ConversationClearPlanTargetStatus = 'active' | 'archived';
|
|
188
206
|
interface ConversationClearPlan {
|
|
189
207
|
id: string;
|
|
190
208
|
status: ConversationClearPlanStatus;
|
|
209
|
+
target_status?: ConversationClearPlanTargetStatus;
|
|
191
210
|
created_at: string;
|
|
192
211
|
updated_at: string;
|
|
193
212
|
total_count: number;
|
|
@@ -197,6 +216,19 @@ interface ConversationClearPlan {
|
|
|
197
216
|
conversations: BulkDeleteConversationResult[];
|
|
198
217
|
completed_at?: string;
|
|
199
218
|
}
|
|
219
|
+
type ConversationArchivePlanStatus = ConversationClearPlanStatus;
|
|
220
|
+
interface ConversationArchivePlan {
|
|
221
|
+
id: string;
|
|
222
|
+
status: ConversationArchivePlanStatus;
|
|
223
|
+
created_at: string;
|
|
224
|
+
updated_at: string;
|
|
225
|
+
total_count: number;
|
|
226
|
+
archived_count: number;
|
|
227
|
+
failed_count: number;
|
|
228
|
+
conversation_ids: string[];
|
|
229
|
+
conversations: BulkArchiveConversationResult[];
|
|
230
|
+
completed_at?: string;
|
|
231
|
+
}
|
|
200
232
|
interface LinkRun {
|
|
201
233
|
id: string;
|
|
202
234
|
kind?: 'agent' | 'command';
|
|
@@ -272,6 +304,7 @@ interface LinkStatistics {
|
|
|
272
304
|
conversations: {
|
|
273
305
|
total: number;
|
|
274
306
|
active: number;
|
|
307
|
+
archived: number;
|
|
275
308
|
deleted: number;
|
|
276
309
|
};
|
|
277
310
|
tokens: {
|
|
@@ -376,6 +409,7 @@ declare class ConversationService {
|
|
|
376
409
|
private hermesSessionSyncPromise;
|
|
377
410
|
constructor(paths: RuntimePaths, logger: FileLogger);
|
|
378
411
|
private withConversationLock;
|
|
412
|
+
private restoreArchivedConversationForUserContinuationLocked;
|
|
379
413
|
listConversations(): Promise<ConversationSummary[]>;
|
|
380
414
|
listConversationPage(input?: {
|
|
381
415
|
limit?: number;
|
|
@@ -386,6 +420,15 @@ declare class ConversationService {
|
|
|
386
420
|
cursor?: string;
|
|
387
421
|
query?: string;
|
|
388
422
|
}): Promise<ConversationListPage>;
|
|
423
|
+
listArchivedConversationPage(input?: {
|
|
424
|
+
limit?: number;
|
|
425
|
+
cursor?: string;
|
|
426
|
+
}): Promise<ConversationListPage>;
|
|
427
|
+
searchArchivedConversationPage(input?: {
|
|
428
|
+
limit?: number;
|
|
429
|
+
cursor?: string;
|
|
430
|
+
query?: string;
|
|
431
|
+
}): Promise<ConversationListPage>;
|
|
389
432
|
getStatistics(filter?: LinkStatisticsFilter): Promise<LinkStatistics>;
|
|
390
433
|
rebuildStatisticsIndex(): Promise<void>;
|
|
391
434
|
createConversation(input?: {
|
|
@@ -442,6 +485,7 @@ declare class ConversationService {
|
|
|
442
485
|
listEvents(conversationId: string, after?: number): Promise<ConversationEvent[]>;
|
|
443
486
|
subscribe(conversationId: string, listener: ConversationEventListener): () => void;
|
|
444
487
|
subscribeAll(listener: ConversationEventListener): () => void;
|
|
488
|
+
shouldPublishNotificationEvent(event: Pick<ConversationEvent, 'type' | 'conversation_id' | 'payload'>): Promise<boolean>;
|
|
445
489
|
sendMessage(input: SendMessageInput): Promise<SendMessageResult>;
|
|
446
490
|
cancelRun(conversationId: string, runId: string): Promise<CancelRunResult>;
|
|
447
491
|
cancelRunById(runId: string): Promise<CancelRunResult>;
|
|
@@ -463,10 +507,18 @@ declare class ConversationService {
|
|
|
463
507
|
last_event_seq: number;
|
|
464
508
|
}>;
|
|
465
509
|
deleteConversation(conversationId: string): Promise<DeleteConversationResult>;
|
|
466
|
-
|
|
510
|
+
archiveConversation(conversationId: string): Promise<ArchiveConversationResult>;
|
|
511
|
+
unarchiveConversation(conversationId: string): Promise<UnarchiveConversationResult>;
|
|
512
|
+
prepareClearAllConversationPlan(targetStatus?: ConversationClearPlanTargetStatus): Promise<ConversationClearPlan>;
|
|
467
513
|
readClearAllConversationPlan(planId: string): Promise<ConversationClearPlan>;
|
|
468
514
|
executeClearAllConversationPlan(planId: string): Promise<ConversationClearPlan>;
|
|
469
515
|
startClearAllConversationPlan(planId: string): Promise<ConversationClearPlan>;
|
|
516
|
+
prepareArchiveAllConversationPlan(input?: {
|
|
517
|
+
excludeConversationIds?: string[];
|
|
518
|
+
}): Promise<ConversationArchivePlan>;
|
|
519
|
+
readArchiveAllConversationPlan(planId: string): Promise<ConversationArchivePlan>;
|
|
520
|
+
executeArchiveAllConversationPlan(planId: string): Promise<ConversationArchivePlan>;
|
|
521
|
+
startArchiveAllConversationPlan(planId: string): Promise<ConversationArchivePlan>;
|
|
470
522
|
deleteConversations(conversationIds: string[]): Promise<{
|
|
471
523
|
deleted_count: number;
|
|
472
524
|
failed_count: number;
|
package/dist/http/app.js
CHANGED
package/package.json
CHANGED
package/scripts/postinstall.mjs
CHANGED
|
@@ -99,9 +99,12 @@ async function main() {
|
|
|
99
99
|
console.log(
|
|
100
100
|
`如果当前 shell 找不到 \`hermeslink\`,说明 npm 全局 bin 目录没有进 PATH:${globalBinDir}`,
|
|
101
101
|
);
|
|
102
|
+
console.log("你也可以先运行不依赖 PATH 的诊断:npx --yes @hermespilot/link doctor --install");
|
|
102
103
|
console.log(`你可以直接运行:${commandPath} pair`);
|
|
103
104
|
if (process.platform !== "win32") {
|
|
104
105
|
console.log(`或者先补 PATH:export PATH="${globalBinDir}:$PATH"`);
|
|
106
|
+
} else {
|
|
107
|
+
console.log(`或者把这个目录加入当前用户的 Path,然后重新打开终端:${globalBinDir}`);
|
|
105
108
|
}
|
|
106
109
|
}
|
|
107
110
|
} else {
|
|
@@ -111,9 +114,12 @@ async function main() {
|
|
|
111
114
|
console.log(
|
|
112
115
|
`If your shell cannot find \`hermeslink\`, npm's global bin directory is not on PATH: ${globalBinDir}`,
|
|
113
116
|
);
|
|
117
|
+
console.log("You can run a PATH-independent diagnostic first: npx --yes @hermespilot/link doctor --install");
|
|
114
118
|
console.log(`You can run it directly: ${commandPath} pair`);
|
|
115
119
|
if (process.platform !== "win32") {
|
|
116
120
|
console.log(`Or add it to PATH first: export PATH="${globalBinDir}:$PATH"`);
|
|
121
|
+
} else {
|
|
122
|
+
console.log(`Or add this directory to your user Path, then open a new terminal: ${globalBinDir}`);
|
|
117
123
|
}
|
|
118
124
|
}
|
|
119
125
|
}
|