@cmgmyr/hive 1.8.0 → 1.9.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/README.md +2 -2
- package/dist/build-info.json +1 -1
- package/dist/claudeWake.js +44 -0
- package/dist/cli.js +11 -7
- package/dist/dashboard.js +65 -14
- package/dist/db.js +20 -0
- package/dist/harnesses.js +2 -2
- package/dist/help.js +7 -3
- package/dist/hook.js +22 -0
- package/dist/hooks.js +14 -0
- package/dist/leadMessage.js +29 -8
- package/dist/leadMessageDelivery.js +379 -0
- package/dist/projectYml.js +14 -0
- package/dist/queenDashboard.js +1 -1
- package/dist/scheduler.js +257 -33
- package/dist/tmux.js +42 -7
- package/dist/tools/agents.js +56 -4
- package/dist/tools/wakes.js +26 -3
- package/package.json +1 -1
package/dist/tools/wakes.js
CHANGED
|
@@ -102,7 +102,7 @@ function deliveryState(t, hasChannel) {
|
|
|
102
102
|
held_at: t.held_at,
|
|
103
103
|
held_reason: t.held_reason,
|
|
104
104
|
confirmed_at: t.confirmed_at,
|
|
105
|
-
confirmation: t.typed_at == null
|
|
105
|
+
confirmation: t.typed_at == null && t.socket_attempt_at == null
|
|
106
106
|
? null
|
|
107
107
|
: t.confirmed_at != null
|
|
108
108
|
? "confirmed"
|
|
@@ -111,8 +111,24 @@ function deliveryState(t, hasChannel) {
|
|
|
111
111
|
: t.typed_busy === 1
|
|
112
112
|
? "unconfirmed_busy"
|
|
113
113
|
: "unconfirmed",
|
|
114
|
+
delivery_method: t.delivery_method,
|
|
115
|
+
delivered_by: t.delivered_by,
|
|
116
|
+
socket_attempt_at: t.socket_attempt_at,
|
|
114
117
|
};
|
|
115
118
|
}
|
|
119
|
+
function deliveredByNote(t) {
|
|
120
|
+
if (t.delivery_method === null)
|
|
121
|
+
return null;
|
|
122
|
+
if (t.delivered_by === null)
|
|
123
|
+
return "delivered by a hive build older than this field";
|
|
124
|
+
if (t.repeat_every_ms === null)
|
|
125
|
+
return null;
|
|
126
|
+
const firing = t.delivered_by.match(/, firing #(\d+)$/);
|
|
127
|
+
return firing !== null && Number(firing[1]) !== t.fire_count
|
|
128
|
+
? `firing #${t.fire_count} was claimed by a hive build older than this field; ` +
|
|
129
|
+
"that build types it into the pane and does not record delivered_by"
|
|
130
|
+
: null;
|
|
131
|
+
}
|
|
116
132
|
export const truncateBody = (body) => body.length > 120 ? `${cutToUnitBudget(body, 120)}…` : body;
|
|
117
133
|
function rejectUnsafeBody(body) {
|
|
118
134
|
const bad = findUnsafeControlChar(body, TEXT_ALLOWED_CONTROL_CHARS);
|
|
@@ -484,7 +500,13 @@ export function registerWakes(server) {
|
|
|
484
500
|
server.registerTool("wake_get", {
|
|
485
501
|
description: "Read one wake-up by id, in this project, with its UNTRUNCATED body. wake_list truncates " +
|
|
486
502
|
"body at 120 chars; use this to see exactly what a wake will say, or to confirm what " +
|
|
487
|
-
"wake_update just changed."
|
|
503
|
+
"wake_update just changed. Its delivery state includes delivery_method (socket, socket-repeating, pty or " +
|
|
504
|
+
"pty-after-socket-timeout), delivered_by (the pid and build of the server that last set the delivery method, " +
|
|
505
|
+
"plus the firing number for repeating wakes), " +
|
|
506
|
+
"and socket_attempt_at, set when a wake was posted to a Claude lead's socket; " +
|
|
507
|
+
"for a repeating wake both describe its current firing (fire_count). An older repeat claim is " +
|
|
508
|
+
"identified in delivered_by_note as a claim; the older build types the firing into the pane " +
|
|
509
|
+
"without recording delivered_by.",
|
|
488
510
|
annotations: {
|
|
489
511
|
readOnlyHint: false,
|
|
490
512
|
destructiveHint: false,
|
|
@@ -508,6 +530,7 @@ export function registerWakes(server) {
|
|
|
508
530
|
repeating: t.repeat_every_ms != null,
|
|
509
531
|
fire_count: t.fire_count,
|
|
510
532
|
cancelled_at: t.cancelled_at,
|
|
533
|
+
delivered_by_note: deliveredByNote(t),
|
|
511
534
|
first_held_at: t.first_held_at,
|
|
512
535
|
...deliveryState(t, hasChannel),
|
|
513
536
|
};
|
|
@@ -623,7 +646,7 @@ export function registerWakes(server) {
|
|
|
623
646
|
server.registerTool("wake_list", {
|
|
624
647
|
description: "List pending wake-ups in this project, plus recently_delivered: the last " +
|
|
625
648
|
`${RECENTLY_FIRED_LIMIT} one-shot wakes that have already fired, with their delivery ` +
|
|
626
|
-
"state (typed_at, held_at/held_reason, confirmation). A one-shot wake leaves the " +
|
|
649
|
+
"state (typed_at, held_at/held_reason, confirmation, delivery_method, delivered_by, socket_attempt_at). A one-shot wake leaves the " +
|
|
627
650
|
"pending list the moment it fires; recently_delivered is where to check whether it " +
|
|
628
651
|
"was actually typed and, if its target has a confirmation channel, acknowledged.",
|
|
629
652
|
annotations: {
|
package/package.json
CHANGED