opencode-swarm-plugin 0.50.0 → 0.53.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/bin/commands/log.test.ts +117 -0
- package/bin/commands/log.ts +362 -0
- package/bin/commands/session.ts +377 -0
- package/bin/commands/tree.test.ts +71 -0
- package/bin/commands/tree.ts +131 -0
- package/bin/swarm.ts +78 -2
- package/dist/bin/swarm.js +2192 -1402
- package/dist/compaction-hook.d.ts.map +1 -1
- package/dist/examples/plugin-wrapper-template.ts +271 -23
- package/dist/hive.d.ts +48 -0
- package/dist/hive.d.ts.map +1 -1
- package/dist/hive.js +59 -1
- package/dist/index.d.ts +31 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +307 -8
- package/dist/plugin.js +305 -8
- package/dist/swarm-adversarial-review.d.ts +104 -0
- package/dist/swarm-adversarial-review.d.ts.map +1 -0
- package/dist/swarm-insights.d.ts +54 -0
- package/dist/swarm-insights.d.ts.map +1 -1
- package/dist/swarm-prompts.js +143 -2
- package/dist/swarm-strategies.d.ts.map +1 -1
- package/dist/swarm.d.ts +15 -1
- package/dist/swarm.d.ts.map +1 -1
- package/dist/utils/tree-renderer.d.ts +61 -0
- package/dist/utils/tree-renderer.d.ts.map +1 -0
- package/examples/plugin-wrapper-template.ts +271 -23
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compaction-hook.d.ts","sourceRoot":"","sources":["../src/compaction-hook.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAyCH;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,wBAAwB,s9RA+OpC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,0nCAiCpC,CAAC;AA2FF;;;;;;;;GAQG;AACH,MAAM,MAAM,cAAc,GAAG,OAAO,CAAC;AAErC;;GAEG;AACH,MAAM,WAAW,iBAAiB;IACh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CAAC;SACtB,CAAC;KACH,CAAC,CAAC;IACH,4DAA4D;IAC5D,uBAAuB,CAAC,EAAE,MAAM,MAAM,CAAC;IACvC,2CAA2C;IAC3C,MAAM,CAAC,EAAE;QACP,IAAI,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;QAChD,KAAK,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;QACjD,IAAI,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;QAChD,KAAK,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;KAClD,CAAC;CACH;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,CAAC,EAAE,cAAc,GAAG,qBAAqB,IAwB9C,OAAO;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,EAC5B,QAAQ;IAAE,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,KAC5B,OAAO,CAAC,IAAI,CAAC,CAgSjB"}
|
|
@@ -349,43 +349,193 @@ function logCompaction(
|
|
|
349
349
|
}
|
|
350
350
|
|
|
351
351
|
/**
|
|
352
|
-
*
|
|
352
|
+
* Get date-stamped log file path
|
|
353
|
+
* Format: ~/.config/swarm-tools/logs/{type}-YYYY-MM-DD.log
|
|
354
|
+
*/
|
|
355
|
+
function getDateStampedLogPath(type: "tools" | "swarmmail" | "errors"): string {
|
|
356
|
+
const today = new Date().toISOString().split("T")[0]; // YYYY-MM-DD
|
|
357
|
+
return join(LOG_DIR, `${type}-${today}.log`);
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
/**
|
|
361
|
+
* Rotate old log files (delete files older than 7 days)
|
|
362
|
+
*
|
|
363
|
+
* Runs silently - never breaks the plugin if rotation fails.
|
|
364
|
+
*/
|
|
365
|
+
function rotateLogFiles(): void {
|
|
366
|
+
try {
|
|
367
|
+
ensureLogDir();
|
|
368
|
+
const { readdirSync, unlinkSync, statSync } = require("node:fs");
|
|
369
|
+
const files = readdirSync(LOG_DIR);
|
|
370
|
+
const now = Date.now();
|
|
371
|
+
const sevenDaysMs = 7 * 24 * 60 * 60 * 1000;
|
|
372
|
+
|
|
373
|
+
for (const file of files) {
|
|
374
|
+
// Only rotate date-stamped files (tools-*, swarmmail-*, errors-*)
|
|
375
|
+
if (!/^(tools|swarmmail|errors)-\d{4}-\d{2}-\d{2}\.log$/.test(file)) {
|
|
376
|
+
continue;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
const filePath = join(LOG_DIR, file);
|
|
380
|
+
const stats = statSync(filePath);
|
|
381
|
+
const age = now - stats.mtimeMs;
|
|
382
|
+
|
|
383
|
+
if (age > sevenDaysMs) {
|
|
384
|
+
unlinkSync(filePath);
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
} catch {
|
|
388
|
+
// Silently fail - rotation failures shouldn't break the plugin
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
/**
|
|
393
|
+
* Log a tool invocation to date-stamped file
|
|
394
|
+
*
|
|
395
|
+
* @param toolName - Tool name (e.g., "hive_create", "swarm_status")
|
|
396
|
+
* @param args - Tool arguments
|
|
397
|
+
* @param result - Tool result (optional, for successful calls)
|
|
398
|
+
* @param error - Error message (optional, for failed calls)
|
|
399
|
+
*/
|
|
400
|
+
function logTool(
|
|
401
|
+
toolName: string,
|
|
402
|
+
args: Record<string, unknown>,
|
|
403
|
+
result?: string,
|
|
404
|
+
error?: string,
|
|
405
|
+
): void {
|
|
406
|
+
try {
|
|
407
|
+
ensureLogDir();
|
|
408
|
+
rotateLogFiles(); // Rotate on every log call (cheap operation)
|
|
409
|
+
|
|
410
|
+
const logPath = getDateStampedLogPath("tools");
|
|
411
|
+
const entry = JSON.stringify({
|
|
412
|
+
time: new Date().toISOString(),
|
|
413
|
+
level: error ? "error" : "info",
|
|
414
|
+
msg: `tool_call: ${toolName}`,
|
|
415
|
+
tool: toolName,
|
|
416
|
+
args,
|
|
417
|
+
...(result && { result }),
|
|
418
|
+
...(error && { error }),
|
|
419
|
+
});
|
|
420
|
+
|
|
421
|
+
appendFileSync(logPath, entry + "\n");
|
|
422
|
+
} catch {
|
|
423
|
+
// Silently fail - logging should never break the plugin
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
/**
|
|
428
|
+
* Log a Swarm Mail event to date-stamped file
|
|
353
429
|
*
|
|
354
|
-
*
|
|
355
|
-
*
|
|
430
|
+
* @param event - Event type (e.g., "message_sent", "inbox_fetched")
|
|
431
|
+
* @param data - Event data
|
|
432
|
+
*/
|
|
433
|
+
function logSwarmMail(
|
|
434
|
+
event: string,
|
|
435
|
+
data: Record<string, unknown>,
|
|
436
|
+
): void {
|
|
437
|
+
try {
|
|
438
|
+
ensureLogDir();
|
|
439
|
+
rotateLogFiles();
|
|
440
|
+
|
|
441
|
+
const logPath = getDateStampedLogPath("swarmmail");
|
|
442
|
+
const entry = JSON.stringify({
|
|
443
|
+
time: new Date().toISOString(),
|
|
444
|
+
level: "info",
|
|
445
|
+
msg: event,
|
|
446
|
+
...data,
|
|
447
|
+
});
|
|
448
|
+
|
|
449
|
+
appendFileSync(logPath, entry + "\n");
|
|
450
|
+
} catch {
|
|
451
|
+
// Silently fail
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
/**
|
|
456
|
+
* Log an error to date-stamped file
|
|
457
|
+
*
|
|
458
|
+
* @param error - Error message
|
|
459
|
+
* @param data - Additional error context
|
|
460
|
+
*/
|
|
461
|
+
function logError(
|
|
462
|
+
error: string,
|
|
463
|
+
data?: Record<string, unknown>,
|
|
464
|
+
): void {
|
|
465
|
+
try {
|
|
466
|
+
ensureLogDir();
|
|
467
|
+
rotateLogFiles();
|
|
468
|
+
|
|
469
|
+
const logPath = getDateStampedLogPath("errors");
|
|
470
|
+
const entry = JSON.stringify({
|
|
471
|
+
time: new Date().toISOString(),
|
|
472
|
+
level: "error",
|
|
473
|
+
msg: error,
|
|
474
|
+
...data,
|
|
475
|
+
});
|
|
476
|
+
|
|
477
|
+
appendFileSync(logPath, entry + "\n");
|
|
478
|
+
} catch {
|
|
479
|
+
// Silently fail
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
/**
|
|
484
|
+
* Capture compaction event for evals (INLINED - do not import from opencode-swarm-plugin)
|
|
485
|
+
*
|
|
486
|
+
* Writes COMPACTION events directly to session JSONL file.
|
|
487
|
+
* This is inlined to avoid import issues - plugin wrapper must be 100% self-contained.
|
|
488
|
+
*
|
|
489
|
+
* Matches the structure of captureCompactionEvent from eval-capture.ts but writes
|
|
490
|
+
* ONLY to JSONL (not libSQL) to avoid swarm-mail dependency.
|
|
356
491
|
*
|
|
357
492
|
* @param sessionID - Session ID
|
|
358
493
|
* @param epicID - Epic ID (or "unknown" if not detected)
|
|
359
|
-
* @param compactionType - Event type (detection_complete, prompt_generated, context_injected)
|
|
494
|
+
* @param compactionType - Event type (detection_complete, prompt_generated, context_injected, resumption_started, tool_call_tracked)
|
|
360
495
|
* @param payload - Event-specific data (full prompts, detection results, etc.)
|
|
361
496
|
*/
|
|
362
497
|
async function captureCompaction(
|
|
363
498
|
sessionID: string,
|
|
364
499
|
epicID: string,
|
|
365
|
-
compactionType: "detection_complete" | "prompt_generated" | "context_injected",
|
|
500
|
+
compactionType: "detection_complete" | "prompt_generated" | "context_injected" | "resumption_started" | "tool_call_tracked",
|
|
366
501
|
payload: any,
|
|
367
502
|
): Promise<void> {
|
|
368
503
|
try {
|
|
369
|
-
//
|
|
370
|
-
const
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
"
|
|
375
|
-
|
|
376
|
-
|
|
504
|
+
// Build the CoordinatorEvent object matching eval-capture.ts schema
|
|
505
|
+
const event = {
|
|
506
|
+
session_id: sessionID,
|
|
507
|
+
epic_id: epicID,
|
|
508
|
+
timestamp: new Date().toISOString(),
|
|
509
|
+
event_type: "COMPACTION",
|
|
510
|
+
compaction_type: compactionType,
|
|
511
|
+
payload: payload,
|
|
512
|
+
};
|
|
513
|
+
|
|
514
|
+
// Session directory: ~/.config/swarm-tools/sessions/
|
|
515
|
+
const sessionDir = process.env.SWARM_SESSIONS_DIR ||
|
|
516
|
+
join(homedir(), ".config", "swarm-tools", "sessions");
|
|
377
517
|
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
518
|
+
// Ensure directory exists
|
|
519
|
+
if (!existsSync(sessionDir)) {
|
|
520
|
+
mkdirSync(sessionDir, { recursive: true });
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
// Write to JSONL (append mode)
|
|
524
|
+
const sessionPath = join(sessionDir, `${sessionID}.jsonl`);
|
|
525
|
+
const line = `${JSON.stringify(event)}\n`;
|
|
526
|
+
appendFileSync(sessionPath, line, "utf-8");
|
|
527
|
+
|
|
528
|
+
logCompaction("debug", "compaction_event_captured", {
|
|
529
|
+
session_id: sessionID,
|
|
530
|
+
epic_id: epicID,
|
|
531
|
+
compaction_type: compactionType,
|
|
532
|
+
session_path: sessionPath,
|
|
381
533
|
});
|
|
382
|
-
|
|
383
|
-
// Don't wait - capture is non-blocking
|
|
384
|
-
proc.unref();
|
|
385
534
|
} catch (err) {
|
|
386
535
|
// Non-fatal - capture failures shouldn't break compaction
|
|
387
536
|
logCompaction("warn", "compaction_capture_failed", {
|
|
388
537
|
session_id: sessionID,
|
|
538
|
+
epic_id: epicID,
|
|
389
539
|
compaction_type: compactionType,
|
|
390
540
|
error: err instanceof Error ? err.message : String(err),
|
|
391
541
|
});
|
|
@@ -451,6 +601,14 @@ async function execTool(
|
|
|
451
601
|
try {
|
|
452
602
|
const result = JSON.parse(stdout);
|
|
453
603
|
if (result.success && result.data !== undefined) {
|
|
604
|
+
// Log successful tool call
|
|
605
|
+
logTool(name, args, typeof result.data === "string" ? result.data : JSON.stringify(result.data));
|
|
606
|
+
|
|
607
|
+
// Log Swarm Mail events separately
|
|
608
|
+
if (name.startsWith("swarmmail_")) {
|
|
609
|
+
logSwarmMail(`tool_${name}`, { args, result: result.data });
|
|
610
|
+
}
|
|
611
|
+
|
|
454
612
|
// Unwrap the data for cleaner tool output
|
|
455
613
|
resolve(
|
|
456
614
|
typeof result.data === "string"
|
|
@@ -463,17 +621,30 @@ async function execTool(
|
|
|
463
621
|
const errorMsg = typeof result.error === "string"
|
|
464
622
|
? result.error
|
|
465
623
|
: (result.error.message || "Tool execution failed");
|
|
624
|
+
|
|
625
|
+
// Log failed tool call
|
|
626
|
+
logTool(name, args, undefined, errorMsg);
|
|
627
|
+
logError(`Tool ${name} failed`, { args, error: errorMsg });
|
|
628
|
+
|
|
466
629
|
reject(new Error(errorMsg));
|
|
467
630
|
} else {
|
|
631
|
+
// Log successful (non-standard response)
|
|
632
|
+
logTool(name, args, stdout);
|
|
468
633
|
resolve(stdout);
|
|
469
634
|
}
|
|
470
635
|
} catch {
|
|
636
|
+
// Log successful (unparseable response)
|
|
637
|
+
logTool(name, args, stdout);
|
|
471
638
|
resolve(stdout);
|
|
472
639
|
}
|
|
473
640
|
} else if (code === 2) {
|
|
474
|
-
|
|
641
|
+
const errorMsg = `Unknown tool: ${name}`;
|
|
642
|
+
logError(errorMsg, { args });
|
|
643
|
+
reject(new Error(errorMsg));
|
|
475
644
|
} else if (code === 3) {
|
|
476
|
-
|
|
645
|
+
const errorMsg = `Invalid JSON args: ${stderr}`;
|
|
646
|
+
logError(errorMsg, { tool: name, args });
|
|
647
|
+
reject(new Error(errorMsg));
|
|
477
648
|
} else {
|
|
478
649
|
// Tool returned error
|
|
479
650
|
try {
|
|
@@ -483,15 +654,27 @@ async function execTool(
|
|
|
483
654
|
const errorMsg = typeof result.error === "string"
|
|
484
655
|
? result.error
|
|
485
656
|
: (result.error.message || `Tool failed with code ${code}`);
|
|
657
|
+
|
|
658
|
+
logTool(name, args, undefined, errorMsg);
|
|
659
|
+
logError(`Tool ${name} failed with code ${code}`, { args, error: errorMsg });
|
|
660
|
+
|
|
486
661
|
reject(new Error(errorMsg));
|
|
487
662
|
} else {
|
|
663
|
+
const errorMsg = stderr || stdout || `Tool failed with code ${code}`;
|
|
664
|
+
logTool(name, args, undefined, errorMsg);
|
|
665
|
+
logError(`Tool ${name} failed with code ${code}`, { args, stderr, stdout });
|
|
666
|
+
|
|
488
667
|
reject(
|
|
489
|
-
new Error(
|
|
668
|
+
new Error(errorMsg),
|
|
490
669
|
);
|
|
491
670
|
}
|
|
492
671
|
} catch {
|
|
672
|
+
const errorMsg = stderr || stdout || `Tool failed with code ${code}`;
|
|
673
|
+
logTool(name, args, undefined, errorMsg);
|
|
674
|
+
logError(`Tool ${name} failed with code ${code}`, { args, stderr, stdout });
|
|
675
|
+
|
|
493
676
|
reject(
|
|
494
|
-
new Error(
|
|
677
|
+
new Error(errorMsg),
|
|
495
678
|
);
|
|
496
679
|
}
|
|
497
680
|
}
|
|
@@ -669,6 +852,42 @@ const beads_link_thread = tool({
|
|
|
669
852
|
execute: (args, ctx) => execTool("beads_link_thread", args, ctx),
|
|
670
853
|
});
|
|
671
854
|
|
|
855
|
+
// =============================================================================
|
|
856
|
+
// Session Handoff Tools (Chainlink-inspired)
|
|
857
|
+
// =============================================================================
|
|
858
|
+
|
|
859
|
+
const hive_session_start = tool({
|
|
860
|
+
description: `Start a new work session with optional handoff notes from previous session.
|
|
861
|
+
|
|
862
|
+
Chainlink-inspired session management for context preservation across sessions.
|
|
863
|
+
Returns previous session's handoff notes if available.
|
|
864
|
+
|
|
865
|
+
Credit: Chainlink session handoff pattern from https://github.com/dollspace-gay/chainlink`,
|
|
866
|
+
args: {
|
|
867
|
+
active_cell_id: tool.schema
|
|
868
|
+
.string()
|
|
869
|
+
.optional()
|
|
870
|
+
.describe("ID of cell being worked on"),
|
|
871
|
+
},
|
|
872
|
+
execute: (args, ctx) => execTool("hive_session_start", args, ctx),
|
|
873
|
+
});
|
|
874
|
+
|
|
875
|
+
const hive_session_end = tool({
|
|
876
|
+
description: `End current session with handoff notes for next session.
|
|
877
|
+
|
|
878
|
+
Save context for the next agent/session to pick up where you left off.
|
|
879
|
+
Include: what was done, what's next, any blockers or gotchas.
|
|
880
|
+
|
|
881
|
+
Credit: Chainlink session handoff pattern from https://github.com/dollspace-gay/chainlink`,
|
|
882
|
+
args: {
|
|
883
|
+
handoff_notes: tool.schema
|
|
884
|
+
.string()
|
|
885
|
+
.optional()
|
|
886
|
+
.describe("Notes for next session (e.g., 'Completed X. Next: do Y. Watch out for Z.')"),
|
|
887
|
+
},
|
|
888
|
+
execute: (args, ctx) => execTool("hive_session_end", args, ctx),
|
|
889
|
+
});
|
|
890
|
+
|
|
672
891
|
// =============================================================================
|
|
673
892
|
// Swarm Mail Tools (Embedded)
|
|
674
893
|
// =============================================================================
|
|
@@ -1184,6 +1403,30 @@ const swarm_review_feedback = tool({
|
|
|
1184
1403
|
execute: (args, ctx) => execTool("swarm_review_feedback", args, ctx),
|
|
1185
1404
|
});
|
|
1186
1405
|
|
|
1406
|
+
// =============================================================================
|
|
1407
|
+
// Adversarial Review Tools (VDD/Chainlink-inspired)
|
|
1408
|
+
// =============================================================================
|
|
1409
|
+
|
|
1410
|
+
const swarm_adversarial_review = tool({
|
|
1411
|
+
description: `VDD-style adversarial code review using hostile, fresh-context agent.
|
|
1412
|
+
|
|
1413
|
+
Spawns Sarcasmotron - a hyper-critical reviewer with zero tolerance for slop.
|
|
1414
|
+
Fresh context per review prevents "relationship drift" (becoming lenient over time).
|
|
1415
|
+
|
|
1416
|
+
Returns structured critique with verdict:
|
|
1417
|
+
- APPROVED: Code is solid
|
|
1418
|
+
- NEEDS_CHANGES: Real issues found
|
|
1419
|
+
- HALLUCINATING: Adversary invented issues (code is excellent!)
|
|
1420
|
+
|
|
1421
|
+
Credit: VDD methodology from https://github.com/Vomikron/VDD
|
|
1422
|
+
Credit: Chainlink patterns from https://github.com/dollspace-gay/chainlink`,
|
|
1423
|
+
args: {
|
|
1424
|
+
diff: tool.schema.string().describe("Git diff of changes to review"),
|
|
1425
|
+
test_output: tool.schema.string().optional().describe("Test output (optional)"),
|
|
1426
|
+
},
|
|
1427
|
+
execute: (args, ctx) => execTool("swarm_adversarial_review", args, ctx),
|
|
1428
|
+
});
|
|
1429
|
+
|
|
1187
1430
|
// =============================================================================
|
|
1188
1431
|
// Skills Tools
|
|
1189
1432
|
// =============================================================================
|
|
@@ -2579,6 +2822,9 @@ const SwarmPlugin: Plugin = async (
|
|
|
2579
2822
|
hive_cells,
|
|
2580
2823
|
hive_sync,
|
|
2581
2824
|
beads_link_thread,
|
|
2825
|
+
// Session Handoff (Chainlink)
|
|
2826
|
+
hive_session_start,
|
|
2827
|
+
hive_session_end,
|
|
2582
2828
|
// Swarm Mail (Embedded)
|
|
2583
2829
|
swarmmail_init,
|
|
2584
2830
|
swarmmail_send,
|
|
@@ -2617,6 +2863,8 @@ const SwarmPlugin: Plugin = async (
|
|
|
2617
2863
|
// Structured Review
|
|
2618
2864
|
swarm_review,
|
|
2619
2865
|
swarm_review_feedback,
|
|
2866
|
+
// Adversarial Review (VDD/Chainlink)
|
|
2867
|
+
swarm_adversarial_review,
|
|
2620
2868
|
// Skills
|
|
2621
2869
|
skills_list,
|
|
2622
2870
|
skills_read,
|
package/dist/hive.d.ts
CHANGED
|
@@ -351,6 +351,36 @@ export declare const hive_link_thread: {
|
|
|
351
351
|
thread_id: string;
|
|
352
352
|
}, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
|
|
353
353
|
};
|
|
354
|
+
/**
|
|
355
|
+
* Start a work session
|
|
356
|
+
*
|
|
357
|
+
* Shows previous session's handoff notes if available.
|
|
358
|
+
* Inspired by Chainlink's session management pattern.
|
|
359
|
+
* Credit: @dollspace-gay (https://github.com/dollspace-gay/chainlink)
|
|
360
|
+
*/
|
|
361
|
+
export declare const hive_session_start: {
|
|
362
|
+
description: string;
|
|
363
|
+
args: {
|
|
364
|
+
active_cell_id: z.ZodOptional<z.ZodString>;
|
|
365
|
+
};
|
|
366
|
+
execute(args: {
|
|
367
|
+
active_cell_id?: string | undefined;
|
|
368
|
+
}, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
|
|
369
|
+
};
|
|
370
|
+
/**
|
|
371
|
+
* End the current work session
|
|
372
|
+
*
|
|
373
|
+
* Optionally save handoff notes for next session.
|
|
374
|
+
*/
|
|
375
|
+
export declare const hive_session_end: {
|
|
376
|
+
description: string;
|
|
377
|
+
args: {
|
|
378
|
+
handoff_notes: z.ZodOptional<z.ZodString>;
|
|
379
|
+
};
|
|
380
|
+
execute(args: {
|
|
381
|
+
handoff_notes?: string | undefined;
|
|
382
|
+
}, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
|
|
383
|
+
};
|
|
354
384
|
export declare const hiveTools: {
|
|
355
385
|
hive_create: {
|
|
356
386
|
description: string;
|
|
@@ -543,6 +573,24 @@ export declare const hiveTools: {
|
|
|
543
573
|
thread_id: string;
|
|
544
574
|
}, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
|
|
545
575
|
};
|
|
576
|
+
hive_session_start: {
|
|
577
|
+
description: string;
|
|
578
|
+
args: {
|
|
579
|
+
active_cell_id: z.ZodOptional<z.ZodString>;
|
|
580
|
+
};
|
|
581
|
+
execute(args: {
|
|
582
|
+
active_cell_id?: string | undefined;
|
|
583
|
+
}, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
|
|
584
|
+
};
|
|
585
|
+
hive_session_end: {
|
|
586
|
+
description: string;
|
|
587
|
+
args: {
|
|
588
|
+
handoff_notes: z.ZodOptional<z.ZodString>;
|
|
589
|
+
};
|
|
590
|
+
execute(args: {
|
|
591
|
+
handoff_notes?: string | undefined;
|
|
592
|
+
}, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
|
|
593
|
+
};
|
|
546
594
|
};
|
|
547
595
|
/**
|
|
548
596
|
* @deprecated Use hive_create instead. Will be removed in v1.0
|
package/dist/hive.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hive.d.ts","sourceRoot":"","sources":["../src/hive.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAKL,KAAK,WAAW,EAKjB,MAAM,YAAY,CAAC;AAepB;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAE/D;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,CAEhD;AAGD,eAAO,MAAM,wBAAwB,gCAA0B,CAAC;AAChE,eAAO,MAAM,wBAAwB,gCAA0B,CAAC;AAuChE;;GAEG;AACH,qBAAa,SAAU,SAAQ,KAAK;aAGhB,OAAO,EAAE,MAAM;aACf,QAAQ,CAAC,EAAE,MAAM;aACjB,MAAM,CAAC,EAAE,MAAM;gBAH/B,OAAO,EAAE,MAAM,EACC,OAAO,EAAE,MAAM,EACf,QAAQ,CAAC,EAAE,MAAM,YAAA,EACjB,MAAM,CAAC,EAAE,MAAM,YAAA;CAKlC;AAGD,eAAO,MAAM,SAAS,kBAAY,CAAC;AAEnC;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,KAAK;aAG1B,QAAQ,EAAE,CAAC,CAAC,QAAQ;gBADpC,OAAO,EAAE,MAAM,EACC,QAAQ,EAAE,CAAC,CAAC,QAAQ;CAKvC;AAGD,eAAO,MAAM,mBAAmB,4BAAsB,CAAC;AAMvD;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,kCAAkC;IAClC,MAAM,EAAE,OAAO,CAAC;IAChB,4CAA4C;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,sCAAsC;IACtC,QAAQ,EAAE,OAAO,CAAC;IAClB,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAA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AEG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMtB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;CAMvB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;CAMtB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,WAAW;;;;;;;;CAMtB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,WAAW;;;;CAMtB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,UAAU;;;;;;;;CAMrB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;CAM5B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAUtB,CAAC"}
|
package/dist/hive.js
CHANGED
|
@@ -14816,6 +14816,60 @@ ${threadMarker}` : threadMarker;
|
|
|
14816
14816
|
}
|
|
14817
14817
|
}
|
|
14818
14818
|
});
|
|
14819
|
+
var hive_session_start = tool({
|
|
14820
|
+
description: "Start a new work session (shows previous handoff notes)",
|
|
14821
|
+
args: {
|
|
14822
|
+
active_cell_id: tool.schema.string().optional().describe("ID of cell being worked on")
|
|
14823
|
+
},
|
|
14824
|
+
async execute(args, ctx) {
|
|
14825
|
+
const projectKey = getHiveWorkingDirectory();
|
|
14826
|
+
const adapter = await getHiveAdapter(projectKey);
|
|
14827
|
+
try {
|
|
14828
|
+
const session = await adapter.startSession(projectKey, {
|
|
14829
|
+
active_cell_id: args.active_cell_id
|
|
14830
|
+
});
|
|
14831
|
+
return JSON.stringify({
|
|
14832
|
+
session_id: session.id,
|
|
14833
|
+
started_at: new Date(session.started_at).toISOString(),
|
|
14834
|
+
active_cell_id: session.active_cell_id,
|
|
14835
|
+
previous_handoff_notes: session.previous_handoff_notes
|
|
14836
|
+
}, null, 2);
|
|
14837
|
+
} catch (error45) {
|
|
14838
|
+
const message = error45 instanceof Error ? error45.message : String(error45);
|
|
14839
|
+
throw new HiveError(`Failed to start session: ${message}`, "hive_session_start");
|
|
14840
|
+
}
|
|
14841
|
+
}
|
|
14842
|
+
});
|
|
14843
|
+
var hive_session_end = tool({
|
|
14844
|
+
description: "End current session with optional handoff notes for next session",
|
|
14845
|
+
args: {
|
|
14846
|
+
handoff_notes: tool.schema.string().optional().describe("Notes for next session (e.g., 'Completed X. Next: do Y')")
|
|
14847
|
+
},
|
|
14848
|
+
async execute(args, ctx) {
|
|
14849
|
+
const projectKey = getHiveWorkingDirectory();
|
|
14850
|
+
const adapter = await getHiveAdapter(projectKey);
|
|
14851
|
+
try {
|
|
14852
|
+
const currentSession = await adapter.getCurrentSession(projectKey);
|
|
14853
|
+
if (!currentSession) {
|
|
14854
|
+
throw new HiveError("No active session to end", "hive_session_end");
|
|
14855
|
+
}
|
|
14856
|
+
const endedSession = await adapter.endSession(projectKey, currentSession.id, {
|
|
14857
|
+
handoff_notes: args.handoff_notes
|
|
14858
|
+
});
|
|
14859
|
+
const duration3 = endedSession.ended_at - endedSession.started_at;
|
|
14860
|
+
return JSON.stringify({
|
|
14861
|
+
session_id: endedSession.id,
|
|
14862
|
+
started_at: new Date(endedSession.started_at).toISOString(),
|
|
14863
|
+
ended_at: new Date(endedSession.ended_at).toISOString(),
|
|
14864
|
+
duration_ms: duration3,
|
|
14865
|
+
handoff_notes: endedSession.handoff_notes
|
|
14866
|
+
}, null, 2);
|
|
14867
|
+
} catch (error45) {
|
|
14868
|
+
const message = error45 instanceof Error ? error45.message : String(error45);
|
|
14869
|
+
throw new HiveError(`Failed to end session: ${message}`, "hive_session_end");
|
|
14870
|
+
}
|
|
14871
|
+
}
|
|
14872
|
+
});
|
|
14819
14873
|
var hiveTools = {
|
|
14820
14874
|
hive_create,
|
|
14821
14875
|
hive_create_epic,
|
|
@@ -14826,7 +14880,9 @@ var hiveTools = {
|
|
|
14826
14880
|
hive_ready,
|
|
14827
14881
|
hive_cells,
|
|
14828
14882
|
hive_sync,
|
|
14829
|
-
hive_link_thread
|
|
14883
|
+
hive_link_thread,
|
|
14884
|
+
hive_session_start,
|
|
14885
|
+
hive_session_end
|
|
14830
14886
|
};
|
|
14831
14887
|
var warnedTools = new Set;
|
|
14832
14888
|
function warnDeprecated(oldName, newName) {
|
|
@@ -14919,6 +14975,8 @@ export {
|
|
|
14919
14975
|
hive_update,
|
|
14920
14976
|
hive_sync,
|
|
14921
14977
|
hive_start,
|
|
14978
|
+
hive_session_start,
|
|
14979
|
+
hive_session_end,
|
|
14922
14980
|
hive_ready,
|
|
14923
14981
|
hive_query,
|
|
14924
14982
|
hive_link_thread,
|
package/dist/index.d.ts
CHANGED
|
@@ -717,6 +717,19 @@ export declare const allTools: {
|
|
|
717
717
|
project_path: string;
|
|
718
718
|
}, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
|
|
719
719
|
};
|
|
720
|
+
readonly swarm_adversarial_review: {
|
|
721
|
+
description: string;
|
|
722
|
+
args: {
|
|
723
|
+
diff: import("zod").ZodString;
|
|
724
|
+
test_output: import("zod").ZodOptional<import("zod").ZodString>;
|
|
725
|
+
is_hallucination_test: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
726
|
+
};
|
|
727
|
+
execute(args: {
|
|
728
|
+
diff: string;
|
|
729
|
+
test_output?: string | undefined;
|
|
730
|
+
is_hallucination_test?: boolean | undefined;
|
|
731
|
+
}, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
|
|
732
|
+
};
|
|
720
733
|
readonly swarm_discover_tools: {
|
|
721
734
|
description: string;
|
|
722
735
|
args: {};
|
|
@@ -1610,6 +1623,24 @@ export declare const allTools: {
|
|
|
1610
1623
|
thread_id: string;
|
|
1611
1624
|
}, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
|
|
1612
1625
|
};
|
|
1626
|
+
readonly hive_session_start: {
|
|
1627
|
+
description: string;
|
|
1628
|
+
args: {
|
|
1629
|
+
active_cell_id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1630
|
+
};
|
|
1631
|
+
execute(args: {
|
|
1632
|
+
active_cell_id?: string | undefined;
|
|
1633
|
+
}, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
|
|
1634
|
+
};
|
|
1635
|
+
readonly hive_session_end: {
|
|
1636
|
+
description: string;
|
|
1637
|
+
args: {
|
|
1638
|
+
handoff_notes: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1639
|
+
};
|
|
1640
|
+
execute(args: {
|
|
1641
|
+
handoff_notes?: string | undefined;
|
|
1642
|
+
}, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
|
|
1643
|
+
};
|
|
1613
1644
|
};
|
|
1614
1645
|
/**
|
|
1615
1646
|
* Type for CLI tool names (all available tools)
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,KAAK,EAAE,MAAM,EAAsB,MAAM,qBAAqB,CAAC;AAkDtE;;;;;;;;;;;;;;;;;;GAkBG;AACH,QAAA,MAAM,WAAW,EAAE,MA2alB,CAAC;AAEF;;;;;;;GAOG;AACH,eAAe,WAAW,CAAC;AAM3B;;GAEG;AACH,cAAc,WAAW,CAAC;AAE1B;;;;;;;;;;;GAWG;AACH,cAAc,QAAQ,CAAC;AAEvB;;;;;;;;;;;;GAYG;AACH,OAAO,EACL,cAAc,EACd,cAAc,EACd,4BAA4B,EAC5B,4BAA4B,EAC5B,oBAAoB,EACpB,4BAA4B,EAC5B,4BAA4B,EAC5B,mBAAmB,EACnB,sBAAsB,EACtB,oBAAoB,EACpB,KAAK,cAAc,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