@herdingchats/friday 0.1.641 → 0.1.645
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/herd.mjs +28 -5
- package/package.json +2 -2
package/herd.mjs
CHANGED
|
@@ -18,7 +18,7 @@ var __export = (target, all) => {
|
|
|
18
18
|
var define_HERD_PACKAGE_default;
|
|
19
19
|
var init_define_HERD_PACKAGE = __esm({
|
|
20
20
|
"<define:HERD_PACKAGE>"() {
|
|
21
|
-
define_HERD_PACKAGE_default = { version: "0.1.
|
|
21
|
+
define_HERD_PACKAGE_default = { version: "0.1.645", gitHead: "768ab1770e2447667409893dd18699acc30e2c03" };
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
24
|
|
|
@@ -762,7 +762,10 @@ var init_machines = __esm({
|
|
|
762
762
|
// Whether its GitHub CLI is signed in, and as whom.
|
|
763
763
|
gh: gitHubCliSchema.optional(),
|
|
764
764
|
// A folder it works in that isn't there, while it takes no work.
|
|
765
|
-
folderUnavailable: folderUnavailableSchema.optional()
|
|
765
|
+
folderUnavailable: folderUnavailableSchema.optional(),
|
|
766
|
+
// The daemon's own package version, or `dev` from a checkout. Daemons from before send none,
|
|
767
|
+
// which reads as older than any that does.
|
|
768
|
+
herdVersion: z8.string().min(1).max(50).optional()
|
|
766
769
|
});
|
|
767
770
|
machineSchema = machineRegistrationSchema.extend({
|
|
768
771
|
ownerId: nonEmpty4,
|
|
@@ -4302,6 +4305,7 @@ function hasUnpushed(path) {
|
|
|
4302
4305
|
}
|
|
4303
4306
|
|
|
4304
4307
|
// src/config.ts
|
|
4308
|
+
init_self();
|
|
4305
4309
|
var repoSchema = z18.object({ name: z18.string(), path: z18.string(), remote: z18.string() });
|
|
4306
4310
|
var configSchema = z18.object({
|
|
4307
4311
|
machineId: z18.string(),
|
|
@@ -4432,7 +4436,8 @@ function registration(config, clis, facts = {}, cloned = []) {
|
|
|
4432
4436
|
...facts.config ? { config: facts.config } : {},
|
|
4433
4437
|
...facts.configError ? { configError: facts.configError.slice(0, 1e3) } : {},
|
|
4434
4438
|
...facts.gh ? { gh: facts.gh } : {},
|
|
4435
|
-
...facts.folderUnavailable ? { folderUnavailable: facts.folderUnavailable } : {}
|
|
4439
|
+
...facts.folderUnavailable ? { folderUnavailable: facts.folderUnavailable } : {},
|
|
4440
|
+
herdVersion: HERD_VERSION
|
|
4436
4441
|
};
|
|
4437
4442
|
}
|
|
4438
4443
|
function describeCli(name, version) {
|
|
@@ -9815,6 +9820,7 @@ var DispatchConnection = class {
|
|
|
9815
9820
|
const Impl = this.options.WebSocketImpl ?? WebSocket;
|
|
9816
9821
|
const socket = new Impl(target.url, { headers: target.headers });
|
|
9817
9822
|
this.socket = socket;
|
|
9823
|
+
const dropped = /* @__PURE__ */ new Set();
|
|
9818
9824
|
socket.onopen = () => {
|
|
9819
9825
|
this.backoff = MIN_BACKOFF_MS2;
|
|
9820
9826
|
this.pinger = setInterval(() => {
|
|
@@ -9831,7 +9837,17 @@ var DispatchConnection = class {
|
|
|
9831
9837
|
return;
|
|
9832
9838
|
}
|
|
9833
9839
|
const frame = dispatchFrameSchema.safeParse(parsed);
|
|
9834
|
-
if (!frame.success)
|
|
9840
|
+
if (!frame.success) {
|
|
9841
|
+
const type = parsed?.type;
|
|
9842
|
+
const name = typeof type === "string" ? type.slice(0, 40) : "(no type)";
|
|
9843
|
+
if (dropped.has(name)) return;
|
|
9844
|
+
dropped.add(name);
|
|
9845
|
+
const where = frame.error.issues.slice(0, 3).map((issue) => issue.path.join(".") || "(frame)").join(", ");
|
|
9846
|
+
this.options.onDropped?.(
|
|
9847
|
+
`Dropped a "${name}" frame this version can't read (${where}). The service may be newer than this daemon.`
|
|
9848
|
+
);
|
|
9849
|
+
return;
|
|
9850
|
+
}
|
|
9835
9851
|
if (frame.data.type === "reconnect") {
|
|
9836
9852
|
this.backoff = MIN_BACKOFF_MS2;
|
|
9837
9853
|
socket.close(1e3, "Reconnecting as asked");
|
|
@@ -9905,6 +9921,7 @@ var Daemon = class {
|
|
|
9905
9921
|
this.options.onConnected?.();
|
|
9906
9922
|
},
|
|
9907
9923
|
onClose: (reason) => this.log(`Disconnected (${reason}). Reconnecting.`),
|
|
9924
|
+
onDropped: (line2) => this.log(line2),
|
|
9908
9925
|
...this.options.WebSocketImpl ? { WebSocketImpl: this.options.WebSocketImpl } : {}
|
|
9909
9926
|
});
|
|
9910
9927
|
this.connection.start();
|
|
@@ -12343,7 +12360,9 @@ var workerListingSchema = z28.object({
|
|
|
12343
12360
|
name: z28.string(),
|
|
12344
12361
|
online: z28.boolean(),
|
|
12345
12362
|
missing: z28.array(z28.string()),
|
|
12346
|
-
configError: z28.string().optional()
|
|
12363
|
+
configError: z28.string().optional(),
|
|
12364
|
+
// Servers from before versions were reported send none.
|
|
12365
|
+
herdVersion: z28.string().nullable().optional()
|
|
12347
12366
|
})
|
|
12348
12367
|
),
|
|
12349
12368
|
configType: z28.string()
|
|
@@ -12404,6 +12423,10 @@ function formatWorkers(listing, current = null) {
|
|
|
12404
12423
|
...machine.configError ? [` ${machine.name}: ${machine.configError}`] : []
|
|
12405
12424
|
]);
|
|
12406
12425
|
if (notes.length > 0) lines.push("", "Configuration:", ...notes);
|
|
12426
|
+
const versions = listing.machines.map(
|
|
12427
|
+
(machine) => ` ${machine.name}: ${machine.herdVersion ?? "a version too old to say"}`
|
|
12428
|
+
);
|
|
12429
|
+
if (versions.length > 0) lines.push("", "Daemon versions:", ...versions);
|
|
12407
12430
|
lines.push(
|
|
12408
12431
|
"",
|
|
12409
12432
|
"Each machine's ~/.herd/herd.config.ts says what it's for, and changes herd's defaults, marked (default). `herd workers --types` shows its type."
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@herdingchats/friday",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.645",
|
|
4
4
|
"description": "Friday, HerdingChats' agent daemon, and the herd command it runs agents with.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -22,5 +22,5 @@
|
|
|
22
22
|
"satori": "0.32.0",
|
|
23
23
|
"zod": "4.6.7"
|
|
24
24
|
},
|
|
25
|
-
"gitHead": "
|
|
25
|
+
"gitHead": "768ab1770e2447667409893dd18699acc30e2c03"
|
|
26
26
|
}
|