@open-artifacts/bus 0.211.0 → 0.213.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/assets/oa-bus.ts +16 -3
- package/assets/oa_bus/copy.py +11 -2
- package/assets/openclaw/index.js +36 -8
- package/assets/openclaw/package.json +1 -1
- package/dist/index.js +85 -19
- package/package.json +2 -2
package/assets/oa-bus.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { StringDecoder } from "node:string_decoder";
|
|
|
11
11
|
type Json = Record<string, unknown>;
|
|
12
12
|
|
|
13
13
|
/** The IPC marker (CONTRACT.md): the package version, stamped by the CLI's bundler. */
|
|
14
|
-
const CLIENT_VERSION = "0.
|
|
14
|
+
const CLIENT_VERSION = "0.213.0";
|
|
15
15
|
|
|
16
16
|
type Frame = Json & { type: string; id: string };
|
|
17
17
|
type Ctx = {
|
|
@@ -611,12 +611,22 @@ function rosterText(
|
|
|
611
611
|
return lines.join("\n");
|
|
612
612
|
}
|
|
613
613
|
|
|
614
|
+
/** #2759: one line for a person's own agents during their quiet hours; the time is ISO UTC. */
|
|
615
|
+
export const ownerAwayText = (until: string): string =>
|
|
616
|
+
`Your person is away until ${until} (quiet hours). Nothing breaks through until then.`;
|
|
617
|
+
|
|
614
618
|
/** @oa/bus-ipc selfText: the agent entry, its status cleaned. */
|
|
615
619
|
function selfText(
|
|
616
620
|
agent: (StatusFields & Record<string, unknown>) | null,
|
|
617
621
|
): string {
|
|
618
622
|
if (!agent) return JSON.stringify(agent, null, 2);
|
|
619
|
-
const {
|
|
623
|
+
const {
|
|
624
|
+
status: _s,
|
|
625
|
+
status_label: _l,
|
|
626
|
+
status_at: _a,
|
|
627
|
+
owner_away_until: away,
|
|
628
|
+
...rest
|
|
629
|
+
} = agent;
|
|
620
630
|
const label =
|
|
621
631
|
typeof agent.status_label === "string"
|
|
622
632
|
? displayLabel(agent.status_label)
|
|
@@ -632,7 +642,10 @@ function selfText(
|
|
|
632
642
|
? { status_at: agent.status_at }
|
|
633
643
|
: {}),
|
|
634
644
|
};
|
|
635
|
-
|
|
645
|
+
const json = JSON.stringify(shown, null, 2);
|
|
646
|
+
return typeof away === "string" && /^[0-9T:.\-Z]{1,40}$/.test(away)
|
|
647
|
+
? `${json}\n\n${ownerAwayText(away)}`
|
|
648
|
+
: json;
|
|
636
649
|
}
|
|
637
650
|
|
|
638
651
|
/** For the parity test; Pi uses only the default export. */
|
package/assets/oa_bus/copy.py
CHANGED
|
@@ -520,10 +520,15 @@ def roster_text(agents, now_ms):
|
|
|
520
520
|
return "\n".join(lines)
|
|
521
521
|
|
|
522
522
|
|
|
523
|
+
def owner_away_text(until):
|
|
524
|
+
# #2759: one line for a person's own agents during quiet hours; the time is ISO UTC.
|
|
525
|
+
return f"Your person is away until {until} (quiet hours). Nothing breaks through until then."
|
|
526
|
+
|
|
527
|
+
|
|
523
528
|
def self_text(agent):
|
|
524
529
|
if not agent:
|
|
525
530
|
return "null"
|
|
526
|
-
rest = {k: v for k, v in agent.items() if k not in ("status", "status_label", "status_at")}
|
|
531
|
+
rest = {k: v for k, v in agent.items() if k not in ("status", "status_label", "status_at", "owner_away_until")}
|
|
527
532
|
label = display_label(agent["status_label"]) if isinstance(agent.get("status_label"), str) else ""
|
|
528
533
|
shown = dict(rest)
|
|
529
534
|
if isinstance(agent.get("status"), str):
|
|
@@ -532,4 +537,8 @@ def self_text(agent):
|
|
|
532
537
|
shown["status_label"] = label
|
|
533
538
|
if isinstance(agent.get("status_at"), str) and parse_time_ms(agent["status_at"]) is not None:
|
|
534
539
|
shown["status_at"] = agent["status_at"]
|
|
535
|
-
|
|
540
|
+
out = json.dumps(shown, indent=2, ensure_ascii=False)
|
|
541
|
+
away = agent.get("owner_away_until")
|
|
542
|
+
if isinstance(away, str) and re.fullmatch(r"[0-9T:.\-Z]{1,40}", away):
|
|
543
|
+
out += "\n\n" + owner_away_text(away)
|
|
544
|
+
return out
|
package/assets/openclaw/index.js
CHANGED
|
@@ -26924,7 +26924,7 @@ function date4(params) {
|
|
|
26924
26924
|
}
|
|
26925
26925
|
|
|
26926
26926
|
// ../bus-protocol/src/caps.ts
|
|
26927
|
-
var MAX_CAPS =
|
|
26927
|
+
var MAX_CAPS = 32;
|
|
26928
26928
|
var CapTokenSchema = external_exports.string().regex(/^[a-z][a-z0-9_-]{0,31}$/);
|
|
26929
26929
|
var CapsSchema = external_exports.array(CapTokenSchema).max(MAX_CAPS).refine((a) => new Set(a).size === a.length, "duplicate caps");
|
|
26930
26930
|
|
|
@@ -27533,6 +27533,7 @@ var Follows = external_exports.strictObject({
|
|
|
27533
27533
|
follows: external_exports.array(FollowEntry).max(MAX_FOLLOWS)
|
|
27534
27534
|
});
|
|
27535
27535
|
var RunVersionSchema = external_exports.string().max(32).regex(/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$/);
|
|
27536
|
+
var OwnerAwayUntilSchema = external_exports.string().max(40).regex(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2}(\.\d{1,6})?)?Z$/).refine((s) => !Number.isNaN(Date.parse(s)), "not a date");
|
|
27536
27537
|
var UPDATE_REASONS = [
|
|
27537
27538
|
"ok",
|
|
27538
27539
|
"unhealthy",
|
|
@@ -27586,6 +27587,12 @@ var RunVersionPush = external_exports.strictObject({
|
|
|
27586
27587
|
/** null: the owner cleared it, the instance names none (#2719). */
|
|
27587
27588
|
run_version: RunVersionSchema.nullable()
|
|
27588
27589
|
});
|
|
27590
|
+
var OwnerAwayPush = external_exports.strictObject({
|
|
27591
|
+
...base,
|
|
27592
|
+
type: external_exports.literal("owner_away"),
|
|
27593
|
+
/** When quiet hours end; null: not in quiet hours. */
|
|
27594
|
+
until: OwnerAwayUntilSchema.nullable()
|
|
27595
|
+
});
|
|
27589
27596
|
var InstallNow = external_exports.strictObject({ ...base, type: external_exports.literal("install_now") });
|
|
27590
27597
|
var UpdateAck = external_exports.strictObject({
|
|
27591
27598
|
...base,
|
|
@@ -27607,7 +27614,12 @@ var HelloOk = external_exports.strictObject({
|
|
|
27607
27614
|
* The version the instance names (BUS_CAPS.runVersion). `null`: it names
|
|
27608
27615
|
* none (cleared, #2719); absent: the hub does not know yet, a push follows.
|
|
27609
27616
|
*/
|
|
27610
|
-
run_version: RunVersionSchema.nullable().optional()
|
|
27617
|
+
run_version: RunVersionSchema.nullable().optional(),
|
|
27618
|
+
/**
|
|
27619
|
+
* When the owner's quiet hours end (BUS_CAPS.ownerAway); `null`: not in
|
|
27620
|
+
* quiet hours. Absent: the hub does not say.
|
|
27621
|
+
*/
|
|
27622
|
+
owner_away_until: OwnerAwayUntilSchema.nullable().optional()
|
|
27611
27623
|
});
|
|
27612
27624
|
var AgentOk = external_exports.strictObject({
|
|
27613
27625
|
...base,
|
|
@@ -27775,7 +27787,8 @@ var ServerFrameSchema = external_exports.discriminatedUnion("type", [
|
|
|
27775
27787
|
Acked,
|
|
27776
27788
|
RunVersionPush,
|
|
27777
27789
|
InstallNow,
|
|
27778
|
-
UpdateAck
|
|
27790
|
+
UpdateAck,
|
|
27791
|
+
OwnerAwayPush
|
|
27779
27792
|
]);
|
|
27780
27793
|
var FrameSchema = external_exports.discriminatedUnion("type", [
|
|
27781
27794
|
Hello,
|
|
@@ -27813,7 +27826,8 @@ var FrameSchema = external_exports.discriminatedUnion("type", [
|
|
|
27813
27826
|
Acked,
|
|
27814
27827
|
RunVersionPush,
|
|
27815
27828
|
InstallNow,
|
|
27816
|
-
UpdateAck
|
|
27829
|
+
UpdateAck,
|
|
27830
|
+
OwnerAwayPush
|
|
27817
27831
|
]);
|
|
27818
27832
|
var MAX_RAW_FRAME_CHARS = 2 * LIMITS.maxMessageBytes + 4096;
|
|
27819
27833
|
|
|
@@ -27832,7 +27846,7 @@ var base2 = { v: external_exports.literal(V), id: external_exports.string().min(
|
|
|
27832
27846
|
var late = { late: external_exports.array(external_exports.string().min(1)).optional() };
|
|
27833
27847
|
var isWellFormed2 = (s) => s.isWellFormed();
|
|
27834
27848
|
var WELL_FORMED = { message: "text is not well-formed unicode" };
|
|
27835
|
-
var CLIENT_VERSION = true ? "0.
|
|
27849
|
+
var CLIENT_VERSION = true ? "0.213.0" : "0.0.0";
|
|
27836
27850
|
var clientVersion = {
|
|
27837
27851
|
client_version: external_exports.string().min(1).max(64).optional()
|
|
27838
27852
|
};
|
|
@@ -28069,7 +28083,9 @@ var AgentInfo = external_exports.object({
|
|
|
28069
28083
|
status_label: StatusLabelSchema.optional(),
|
|
28070
28084
|
status_at: IsoTimeSchema.optional(),
|
|
28071
28085
|
/** `self` with `row` only: config files refused or noted. Older adapters ignore it. */
|
|
28072
|
-
config_files: external_exports.array(ConfigFile).optional()
|
|
28086
|
+
config_files: external_exports.array(ConfigFile).optional(),
|
|
28087
|
+
/** `self` only (#2759): when the owner's quiet hours end, ISO UTC, while they last. */
|
|
28088
|
+
owner_away_until: external_exports.string().max(40).optional()
|
|
28073
28089
|
});
|
|
28074
28090
|
var Welcome = external_exports.object({
|
|
28075
28091
|
...base2,
|
|
@@ -28196,6 +28212,8 @@ var StatusReply = external_exports.object({
|
|
|
28196
28212
|
hub_since: external_exports.number().optional(),
|
|
28197
28213
|
/** The hub's `server_version` from its last `hello_ok`. Absent before one, and from older daemons. */
|
|
28198
28214
|
hub_version: external_exports.string().optional(),
|
|
28215
|
+
/** The owner's quiet hours end (ISO UTC), only while they last (#2759). Older daemons omit it. */
|
|
28216
|
+
owner_away_until: external_exports.string().max(40).optional(),
|
|
28199
28217
|
/** This daemon takes `link_proof` (#1822). Older daemons omit it. */
|
|
28200
28218
|
link: external_exports.boolean().optional(),
|
|
28201
28219
|
/** The namespace `cwd` resolves to, when the request named one. */
|
|
@@ -28724,9 +28742,16 @@ function rosterText(agents, now = Date.now()) {
|
|
|
28724
28742
|
if (collapsed > 0) lines.push(collapsedAwayLine(collapsed, lines.length > 0));
|
|
28725
28743
|
return lines.join("\n");
|
|
28726
28744
|
}
|
|
28745
|
+
var ownerAwayText = (until) => `Your person is away until ${until} (quiet hours). Nothing breaks through until then.`;
|
|
28727
28746
|
function selfText(agent) {
|
|
28728
28747
|
if (!agent) return JSON.stringify(agent, null, 2);
|
|
28729
|
-
const {
|
|
28748
|
+
const {
|
|
28749
|
+
status: _s,
|
|
28750
|
+
status_label: _l,
|
|
28751
|
+
status_at: _a3,
|
|
28752
|
+
owner_away_until: away,
|
|
28753
|
+
...rest
|
|
28754
|
+
} = agent;
|
|
28730
28755
|
const label = typeof agent.status_label === "string" ? displayLabel(agent.status_label) : "";
|
|
28731
28756
|
const shown = {
|
|
28732
28757
|
...rest,
|
|
@@ -28734,7 +28759,10 @@ function selfText(agent) {
|
|
|
28734
28759
|
...label ? { status_label: label } : {},
|
|
28735
28760
|
...typeof agent.status_at === "string" && !Number.isNaN(Date.parse(agent.status_at)) ? { status_at: agent.status_at } : {}
|
|
28736
28761
|
};
|
|
28737
|
-
|
|
28762
|
+
const json2 = JSON.stringify(shown, null, 2);
|
|
28763
|
+
return typeof away === "string" && /^[0-9T:.\-Z]{1,40}$/.test(away) ? `${json2}
|
|
28764
|
+
|
|
28765
|
+
${ownerAwayText(away)}` : json2;
|
|
28738
28766
|
}
|
|
28739
28767
|
|
|
28740
28768
|
// ../bus-adapter-openclaw/src/link.ts
|
package/dist/index.js
CHANGED
|
@@ -31497,9 +31497,16 @@ var init_caps = __esm({
|
|
|
31497
31497
|
* `hello_ok.caps`: Deliver is a strict object, so an older daemon would refuse
|
|
31498
31498
|
* the whole frame. A daemon without it gets the text alone.
|
|
31499
31499
|
*/
|
|
31500
|
-
noticeMeta: "notice_meta"
|
|
31500
|
+
noticeMeta: "notice_meta",
|
|
31501
|
+
/**
|
|
31502
|
+
* Owner away (#2759): `hello_ok.owner_away_until` and the `owner_away` push
|
|
31503
|
+
* tell a person's own agents when their quiet hours end. The hub sends the
|
|
31504
|
+
* field and the frame only to a socket whose hello listed it, and lists it
|
|
31505
|
+
* in `hello_ok.caps`; a strict older decoder would refuse either.
|
|
31506
|
+
*/
|
|
31507
|
+
ownerAway: "owner_away"
|
|
31501
31508
|
};
|
|
31502
|
-
MAX_CAPS =
|
|
31509
|
+
MAX_CAPS = 32;
|
|
31503
31510
|
CapTokenSchema = external_exports.string().regex(/^[a-z][a-z0-9_-]{0,31}$/);
|
|
31504
31511
|
CapsSchema = external_exports.array(CapTokenSchema).max(MAX_CAPS).refine((a) => new Set(a).size === a.length, "duplicate caps");
|
|
31505
31512
|
}
|
|
@@ -32257,7 +32264,7 @@ function decode3(raw, schema, caps) {
|
|
|
32257
32264
|
function decodeServerFrame(raw) {
|
|
32258
32265
|
return decode3(raw, ServerFrameSchema, SERVER_CAPS);
|
|
32259
32266
|
}
|
|
32260
|
-
var PING, PONG, isWellFormed, WellFormedText, FrameIdSchema, base, BodySchema, InlineBodySchema, distinct, Hello, AgentUp, AgentDown, Sessions, Send, Ack, Refuse, List, Fetch, Status, Rename, FollowRefSchema, Follow, Unfollow, Following, LINK_PROOF_HEADER, LinkProofSchema, LinkProofHashSchema, LinkBind, LinkBound, MAX_WAITING_QUERY, WaitingQuery, WaitingCounts, Acked, MAX_FOLLOWS, FollowEntry, Followed, Unfollowed, Follows, RunVersionSchema, UPDATE_REASONS, UPDATE_EVENTS, ReportVersion, UpdateReport, RunVersionPush, InstallNow, UpdateAck, HelloOk, AgentOk, Renamed, ReceiptFrame, RosterAgent, Roster, BodyFrame, AGENT_CAP_MESSAGES, ErrorFrame, NOTICE_META_ID_RE, Notice, NoticeMetaSchema, Deliver, ReceiptUpdate, RosterChanged, ClientFrameSchema, ServerFrameSchema, FrameSchema, MAX_RAW_FRAME_CHARS, SERVER_CAPS, MAX_OBJECT_TOKENS, ID_PREFIX_RE;
|
|
32267
|
+
var PING, PONG, isWellFormed, WellFormedText, FrameIdSchema, base, BodySchema, InlineBodySchema, distinct, Hello, AgentUp, AgentDown, Sessions, Send, Ack, Refuse, List, Fetch, Status, Rename, FollowRefSchema, Follow, Unfollow, Following, LINK_PROOF_HEADER, LinkProofSchema, LinkProofHashSchema, LinkBind, LinkBound, MAX_WAITING_QUERY, WaitingQuery, WaitingCounts, Acked, MAX_FOLLOWS, FollowEntry, Followed, Unfollowed, Follows, RunVersionSchema, OwnerAwayUntilSchema, UPDATE_REASONS, UPDATE_EVENTS, ReportVersion, UpdateReport, RunVersionPush, OwnerAwayPush, InstallNow, UpdateAck, HelloOk, AgentOk, Renamed, ReceiptFrame, RosterAgent, Roster, BodyFrame, AGENT_CAP_MESSAGES, ErrorFrame, NOTICE_META_ID_RE, Notice, NoticeMetaSchema, Deliver, ReceiptUpdate, RosterChanged, ClientFrameSchema, ServerFrameSchema, FrameSchema, MAX_RAW_FRAME_CHARS, SERVER_CAPS, MAX_OBJECT_TOKENS, ID_PREFIX_RE;
|
|
32261
32268
|
var init_protocol2 = __esm({
|
|
32262
32269
|
"../bus-protocol/src/protocol.ts"() {
|
|
32263
32270
|
"use strict";
|
|
@@ -32475,6 +32482,7 @@ var init_protocol2 = __esm({
|
|
|
32475
32482
|
follows: external_exports.array(FollowEntry).max(MAX_FOLLOWS)
|
|
32476
32483
|
});
|
|
32477
32484
|
RunVersionSchema = external_exports.string().max(32).regex(/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$/);
|
|
32485
|
+
OwnerAwayUntilSchema = external_exports.string().max(40).regex(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2}(\.\d{1,6})?)?Z$/).refine((s) => !Number.isNaN(Date.parse(s)), "not a date");
|
|
32478
32486
|
UPDATE_REASONS = [
|
|
32479
32487
|
"ok",
|
|
32480
32488
|
"unhealthy",
|
|
@@ -32528,6 +32536,12 @@ var init_protocol2 = __esm({
|
|
|
32528
32536
|
/** null: the owner cleared it, the instance names none (#2719). */
|
|
32529
32537
|
run_version: RunVersionSchema.nullable()
|
|
32530
32538
|
});
|
|
32539
|
+
OwnerAwayPush = external_exports.strictObject({
|
|
32540
|
+
...base,
|
|
32541
|
+
type: external_exports.literal("owner_away"),
|
|
32542
|
+
/** When quiet hours end; null: not in quiet hours. */
|
|
32543
|
+
until: OwnerAwayUntilSchema.nullable()
|
|
32544
|
+
});
|
|
32531
32545
|
InstallNow = external_exports.strictObject({ ...base, type: external_exports.literal("install_now") });
|
|
32532
32546
|
UpdateAck = external_exports.strictObject({
|
|
32533
32547
|
...base,
|
|
@@ -32549,7 +32563,12 @@ var init_protocol2 = __esm({
|
|
|
32549
32563
|
* The version the instance names (BUS_CAPS.runVersion). `null`: it names
|
|
32550
32564
|
* none (cleared, #2719); absent: the hub does not know yet, a push follows.
|
|
32551
32565
|
*/
|
|
32552
|
-
run_version: RunVersionSchema.nullable().optional()
|
|
32566
|
+
run_version: RunVersionSchema.nullable().optional(),
|
|
32567
|
+
/**
|
|
32568
|
+
* When the owner's quiet hours end (BUS_CAPS.ownerAway); `null`: not in
|
|
32569
|
+
* quiet hours. Absent: the hub does not say.
|
|
32570
|
+
*/
|
|
32571
|
+
owner_away_until: OwnerAwayUntilSchema.nullable().optional()
|
|
32553
32572
|
});
|
|
32554
32573
|
AgentOk = external_exports.strictObject({
|
|
32555
32574
|
...base,
|
|
@@ -32721,7 +32740,8 @@ var init_protocol2 = __esm({
|
|
|
32721
32740
|
Acked,
|
|
32722
32741
|
RunVersionPush,
|
|
32723
32742
|
InstallNow,
|
|
32724
|
-
UpdateAck
|
|
32743
|
+
UpdateAck,
|
|
32744
|
+
OwnerAwayPush
|
|
32725
32745
|
]);
|
|
32726
32746
|
FrameSchema = external_exports.discriminatedUnion("type", [
|
|
32727
32747
|
Hello,
|
|
@@ -32759,7 +32779,8 @@ var init_protocol2 = __esm({
|
|
|
32759
32779
|
Acked,
|
|
32760
32780
|
RunVersionPush,
|
|
32761
32781
|
InstallNow,
|
|
32762
|
-
UpdateAck
|
|
32782
|
+
UpdateAck,
|
|
32783
|
+
OwnerAwayPush
|
|
32763
32784
|
]);
|
|
32764
32785
|
MAX_RAW_FRAME_CHARS = 2 * LIMITS.maxMessageBytes + 4096;
|
|
32765
32786
|
SERVER_CAPS = { depth: 5, tokens: 65536, structural: 131072 };
|
|
@@ -32833,7 +32854,7 @@ var init_frames = __esm({
|
|
|
32833
32854
|
late = { late: external_exports.array(external_exports.string().min(1)).optional() };
|
|
32834
32855
|
isWellFormed2 = (s) => s.isWellFormed();
|
|
32835
32856
|
WELL_FORMED = { message: "text is not well-formed unicode" };
|
|
32836
|
-
CLIENT_VERSION = true ? "0.
|
|
32857
|
+
CLIENT_VERSION = true ? "0.213.0" : "0.0.0";
|
|
32837
32858
|
clientVersion = {
|
|
32838
32859
|
client_version: external_exports.string().min(1).max(64).optional()
|
|
32839
32860
|
};
|
|
@@ -33075,7 +33096,9 @@ var init_frames = __esm({
|
|
|
33075
33096
|
status_label: StatusLabelSchema.optional(),
|
|
33076
33097
|
status_at: IsoTimeSchema.optional(),
|
|
33077
33098
|
/** `self` with `row` only: config files refused or noted. Older adapters ignore it. */
|
|
33078
|
-
config_files: external_exports.array(ConfigFile).optional()
|
|
33099
|
+
config_files: external_exports.array(ConfigFile).optional(),
|
|
33100
|
+
/** `self` only (#2759): when the owner's quiet hours end, ISO UTC, while they last. */
|
|
33101
|
+
owner_away_until: external_exports.string().max(40).optional()
|
|
33079
33102
|
});
|
|
33080
33103
|
Welcome = external_exports.object({
|
|
33081
33104
|
...base2,
|
|
@@ -33202,6 +33225,8 @@ var init_frames = __esm({
|
|
|
33202
33225
|
hub_since: external_exports.number().optional(),
|
|
33203
33226
|
/** The hub's `server_version` from its last `hello_ok`. Absent before one, and from older daemons. */
|
|
33204
33227
|
hub_version: external_exports.string().optional(),
|
|
33228
|
+
/** The owner's quiet hours end (ISO UTC), only while they last (#2759). Older daemons omit it. */
|
|
33229
|
+
owner_away_until: external_exports.string().max(40).optional(),
|
|
33205
33230
|
/** This daemon takes `link_proof` (#1822). Older daemons omit it. */
|
|
33206
33231
|
link: external_exports.boolean().optional(),
|
|
33207
33232
|
/** The namespace `cwd` resolves to, when the request named one. */
|
|
@@ -33748,7 +33773,13 @@ function rosterText(agents, now = Date.now()) {
|
|
|
33748
33773
|
}
|
|
33749
33774
|
function selfText(agent) {
|
|
33750
33775
|
if (!agent) return JSON.stringify(agent, null, 2);
|
|
33751
|
-
const {
|
|
33776
|
+
const {
|
|
33777
|
+
status: _s,
|
|
33778
|
+
status_label: _l,
|
|
33779
|
+
status_at: _a3,
|
|
33780
|
+
owner_away_until: away,
|
|
33781
|
+
...rest
|
|
33782
|
+
} = agent;
|
|
33752
33783
|
const label2 = typeof agent.status_label === "string" ? displayLabel(agent.status_label) : "";
|
|
33753
33784
|
const shown5 = {
|
|
33754
33785
|
...rest,
|
|
@@ -33756,9 +33787,12 @@ function selfText(agent) {
|
|
|
33756
33787
|
...label2 ? { status_label: label2 } : {},
|
|
33757
33788
|
...typeof agent.status_at === "string" && !Number.isNaN(Date.parse(agent.status_at)) ? { status_at: agent.status_at } : {}
|
|
33758
33789
|
};
|
|
33759
|
-
|
|
33790
|
+
const json4 = JSON.stringify(shown5, null, 2);
|
|
33791
|
+
return typeof away === "string" && /^[0-9T:.\-Z]{1,40}$/.test(away) ? `${json4}
|
|
33792
|
+
|
|
33793
|
+
${ownerAwayText(away)}` : json4;
|
|
33760
33794
|
}
|
|
33761
|
-
var MAX_COLS, RETAIN, MB, refusals, quoted, TERMINAL_CONTROLS, CUT_OFF, stripTerminalControls, KIND_CHARS, displayKind, neutralizeBody, deliveredText, oversizedText, INVISIBLES, EXCERPT_CHARS, STATUS_COPY, BAD_LABEL_CHARS2, cleanStatusLabel, statusLabelTooLong, statusSetText, earlierStatusText, followText, unfollowText, followingText, FOLLOW_OLD_DAEMON, reachProposedText, reachNamespacesOf, REACH_OLD_DAEMON, FOLLOW_DAEMON_BAD_FRAME, STATUS_STALE_MS, agoText, displayLabel, awayTime, replyGoneText;
|
|
33795
|
+
var MAX_COLS, RETAIN, MB, refusals, quoted, TERMINAL_CONTROLS, CUT_OFF, stripTerminalControls, KIND_CHARS, displayKind, neutralizeBody, deliveredText, oversizedText, INVISIBLES, EXCERPT_CHARS, STATUS_COPY, BAD_LABEL_CHARS2, cleanStatusLabel, statusLabelTooLong, statusSetText, earlierStatusText, followText, unfollowText, followingText, FOLLOW_OLD_DAEMON, reachProposedText, reachNamespacesOf, REACH_OLD_DAEMON, FOLLOW_DAEMON_BAD_FRAME, STATUS_STALE_MS, agoText, displayLabel, awayTime, ownerAwayText, replyGoneText;
|
|
33762
33796
|
var init_copy = __esm({
|
|
33763
33797
|
"../bus-ipc/src/copy.ts"() {
|
|
33764
33798
|
"use strict";
|
|
@@ -33898,6 +33932,7 @@ ${neutralizeBody(m.body)}`;
|
|
|
33898
33932
|
const t = Date.parse(iso);
|
|
33899
33933
|
return Number.isNaN(t) ? iso : `${new Date(t).toISOString().slice(0, 16).replace("T", " ")} UTC`;
|
|
33900
33934
|
};
|
|
33935
|
+
ownerAwayText = (until) => `Your person is away until ${until} (quiet hours). Nothing breaks through until then.`;
|
|
33901
33936
|
replyGoneText = (name) => `[oa-bus] Information: your reply to ${name} was not sent. The agent that wrote to you as ${name} is gone, or wrote over an hour ago, and another agent may hold that name now. Use the oa_bus list_agents and send_message tools to reach the agent you mean.`;
|
|
33902
33937
|
}
|
|
33903
33938
|
});
|
|
@@ -47929,7 +47964,8 @@ var HUB_HELLO_CAPS = [
|
|
|
47929
47964
|
BUS_CAPS.noticeAck,
|
|
47930
47965
|
BUS_CAPS.ackConfirm,
|
|
47931
47966
|
BUS_CAPS.runVersion,
|
|
47932
|
-
BUS_CAPS.noticeMeta
|
|
47967
|
+
BUS_CAPS.noticeMeta,
|
|
47968
|
+
BUS_CAPS.ownerAway
|
|
47933
47969
|
];
|
|
47934
47970
|
var HubConnection = class {
|
|
47935
47971
|
constructor(opts) {
|
|
@@ -48701,6 +48737,7 @@ function routeLocal(frame, hello, reply, ctx) {
|
|
|
48701
48737
|
agent.cwd,
|
|
48702
48738
|
hello.caps?.includes(ADAPTER_CAPS.pending)
|
|
48703
48739
|
) ?? [] : [];
|
|
48740
|
+
const away = ctx.ownerAwayUntil?.();
|
|
48704
48741
|
const self = {
|
|
48705
48742
|
type: "agent",
|
|
48706
48743
|
agent: {
|
|
@@ -48710,7 +48747,8 @@ function routeLocal(frame, hello, reply, ctx) {
|
|
|
48710
48747
|
kind: agent.kind,
|
|
48711
48748
|
live: agent.live,
|
|
48712
48749
|
global: agent.global,
|
|
48713
|
-
...files2.length > 0 ? { config_files: files2 } : {}
|
|
48750
|
+
...files2.length > 0 ? { config_files: files2 } : {},
|
|
48751
|
+
...away === void 0 ? {} : { owner_away_until: away }
|
|
48714
48752
|
}
|
|
48715
48753
|
};
|
|
48716
48754
|
const own2 = frame.row ? ctx.ownRow?.(ref) : void 0;
|
|
@@ -52332,7 +52370,9 @@ var Updater = class {
|
|
|
52332
52370
|
this.stepBackHeld = i;
|
|
52333
52371
|
return { kind: "retry_later" };
|
|
52334
52372
|
}
|
|
52335
|
-
|
|
52373
|
+
const r = await this.switchTo(i.version, false);
|
|
52374
|
+
if (r.kind === "retry_later") this.stepBackHeld = i;
|
|
52375
|
+
return r;
|
|
52336
52376
|
}
|
|
52337
52377
|
if (s.staged?.version === i.version && s.staged.manifest) {
|
|
52338
52378
|
if (treeMatches(versionDir(home2, i.version), s.staged.manifest))
|
|
@@ -52579,16 +52619,33 @@ var Updater = class {
|
|
|
52579
52619
|
person ? "requested" : "ok"
|
|
52580
52620
|
))
|
|
52581
52621
|
return { kind: "retry_later" };
|
|
52622
|
+
const backOut = (reason2) => queueReport(home2, {
|
|
52623
|
+
event: "ready_24h",
|
|
52624
|
+
// "held" on the wire
|
|
52625
|
+
from: running,
|
|
52626
|
+
to: version2,
|
|
52627
|
+
reason: reason2,
|
|
52628
|
+
at: this.now()
|
|
52629
|
+
});
|
|
52582
52630
|
const after = readPolicy(home2);
|
|
52583
|
-
if (after.unreadable || after.off)
|
|
52584
|
-
|
|
52631
|
+
if (after.unreadable || after.off) {
|
|
52632
|
+
backOut("other");
|
|
52585
52633
|
return { kind: "retry_later" };
|
|
52586
|
-
|
|
52634
|
+
}
|
|
52635
|
+
if (staged && !person && this.named !== version2) {
|
|
52636
|
+
backOut("nothing_staged");
|
|
52637
|
+
return { kind: "retry_later" };
|
|
52638
|
+
}
|
|
52639
|
+
if (staged && (after.staged?.version !== version2 || JSON.stringify(after.staged.manifest) !== JSON.stringify(proven) || !after.staged.manifest || !treeMatches(versionDir(home2, version2), after.staged.manifest))) {
|
|
52640
|
+
backOut("staged_changed");
|
|
52587
52641
|
return { kind: "proof_refused", code: "staged_changed" };
|
|
52642
|
+
}
|
|
52588
52643
|
if (staged && [after.newestRun, after.current, running].some(
|
|
52589
52644
|
(v) => v !== void 0 && compareVersions2(version2, v) !== 1
|
|
52590
|
-
))
|
|
52645
|
+
)) {
|
|
52646
|
+
backOut("not_forward");
|
|
52591
52647
|
return { kind: "refused", reason: "not_forward" };
|
|
52648
|
+
}
|
|
52592
52649
|
try {
|
|
52593
52650
|
setPending(home2, { from: running, to: version2, startedAt: now });
|
|
52594
52651
|
recordAttempt(home2, now);
|
|
@@ -52601,6 +52658,7 @@ var Updater = class {
|
|
|
52601
52658
|
this.d.log(
|
|
52602
52659
|
`update ${version2}: could not switch: ${e instanceof Error ? e.message : String(e)}`
|
|
52603
52660
|
);
|
|
52661
|
+
backOut("other");
|
|
52604
52662
|
return { kind: "disabled" };
|
|
52605
52663
|
}
|
|
52606
52664
|
prune(home2, [running, version2, s.previous]);
|
|
@@ -53603,6 +53661,8 @@ async function runDaemon(deps2 = {}) {
|
|
|
53603
53661
|
let hubAckConfirm = false;
|
|
53604
53662
|
let codexReplayLink = 0;
|
|
53605
53663
|
let hubVersion;
|
|
53664
|
+
let ownerAwayUntil;
|
|
53665
|
+
const awayUntil = () => ownerAwayUntil !== void 0 && Date.parse(ownerAwayUntil) > Date.now() ? ownerAwayUntil : void 0;
|
|
53606
53666
|
let hubRunCap = false;
|
|
53607
53667
|
const switchAcks = /* @__PURE__ */ new Map();
|
|
53608
53668
|
let updaterRef;
|
|
@@ -53752,6 +53812,9 @@ async function runDaemon(deps2 = {}) {
|
|
|
53752
53812
|
void updaterRef?.instructFromInstance(frame.run_version).catch((e) => log(`update: ${errText(e)}`));
|
|
53753
53813
|
}
|
|
53754
53814
|
return;
|
|
53815
|
+
case "owner_away":
|
|
53816
|
+
ownerAwayUntil = frame.until ?? void 0;
|
|
53817
|
+
return;
|
|
53755
53818
|
case "install_now":
|
|
53756
53819
|
if (hubRunCap)
|
|
53757
53820
|
void updaterRef?.installNowFromInstance().catch((e) => log(`update: ${errText(e)}`));
|
|
@@ -53784,6 +53847,7 @@ async function runDaemon(deps2 = {}) {
|
|
|
53784
53847
|
hubLinkArg = frame.caps?.includes(BUS_CAPS.linkArg) ?? false;
|
|
53785
53848
|
hubAckConfirm = frame.caps?.includes(BUS_CAPS.ackConfirm) ?? false;
|
|
53786
53849
|
hubRunCap = frame.caps?.includes(BUS_CAPS.runVersion) ?? false;
|
|
53850
|
+
ownerAwayUntil = frame.owner_away_until ?? void 0;
|
|
53787
53851
|
hubHelloed = true;
|
|
53788
53852
|
if (hubRunCap) {
|
|
53789
53853
|
if (frame.run_version === null) updaterRef?.clearNamed();
|
|
@@ -54059,6 +54123,7 @@ async function runDaemon(deps2 = {}) {
|
|
|
54059
54123
|
}),
|
|
54060
54124
|
unbound_proofs: unboundProofs.map((u) => ({ ...u })),
|
|
54061
54125
|
...hubVersion === void 0 ? {} : { hub_version: hubVersion },
|
|
54126
|
+
...awayUntil() === void 0 ? {} : { owner_away_until: awayUntil() },
|
|
54062
54127
|
...only === void 0 ? {} : { namespace: only },
|
|
54063
54128
|
namespaces,
|
|
54064
54129
|
// Read-only: status never marks a late delivery shown.
|
|
@@ -54292,6 +54357,7 @@ async function runDaemon(deps2 = {}) {
|
|
|
54292
54357
|
const rec = agents.byRef(ref);
|
|
54293
54358
|
if (rec) renameFromAdapter(rec, name);
|
|
54294
54359
|
},
|
|
54360
|
+
ownerAwayUntil: awayUntil,
|
|
54295
54361
|
// The self tool's status: the agent's own row on its roster.
|
|
54296
54362
|
ownRow: (ref) => {
|
|
54297
54363
|
const me = agents.byRef(ref);
|
|
@@ -57853,7 +57919,7 @@ var noService = {
|
|
|
57853
57919
|
remove: async () => ({}),
|
|
57854
57920
|
cli: () => ["oa-bus"]
|
|
57855
57921
|
};
|
|
57856
|
-
var VERSION = true ? "0.
|
|
57922
|
+
var VERSION = true ? "0.213.0" : JSON.parse(
|
|
57857
57923
|
readFileSync21(new URL("../package.json", import.meta.url), "utf8")
|
|
57858
57924
|
).version;
|
|
57859
57925
|
var which = (cmd) => {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-artifacts/bus",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.213.0",
|
|
5
5
|
"description": "The Open Artifacts bus: your AI agents reach each other across machines.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -29,6 +29,6 @@
|
|
|
29
29
|
"typecheck": "tsc --noEmit"
|
|
30
30
|
},
|
|
31
31
|
"oaBus": {
|
|
32
|
-
"commit": "
|
|
32
|
+
"commit": "33a38a1c96a6fcf1c448def7c9e1a44a16341cca"
|
|
33
33
|
}
|
|
34
34
|
}
|