@open-artifacts/bus 0.144.0 → 0.145.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 +1 -1
- package/assets/openclaw/index.js +483 -97
- package/assets/openclaw/package.json +1 -1
- package/dist/index.js +569 -171
- package/package.json +1 -1
package/assets/openclaw/index.js
CHANGED
|
@@ -3875,10 +3875,10 @@ var require_fast_uri = __commonJS({
|
|
|
3875
3875
|
schemelessOptions.skipEscape = true;
|
|
3876
3876
|
return serialize(resolved, schemelessOptions);
|
|
3877
3877
|
}
|
|
3878
|
-
function resolveComponent(
|
|
3878
|
+
function resolveComponent(base3, relative, options, skipNormalization) {
|
|
3879
3879
|
const target = {};
|
|
3880
3880
|
if (!skipNormalization) {
|
|
3881
|
-
|
|
3881
|
+
base3 = parse3(serialize(base3, options), options);
|
|
3882
3882
|
relative = parse3(serialize(relative, options), options);
|
|
3883
3883
|
}
|
|
3884
3884
|
options = options || {};
|
|
@@ -3898,32 +3898,32 @@ var require_fast_uri = __commonJS({
|
|
|
3898
3898
|
target.query = relative.query;
|
|
3899
3899
|
} else {
|
|
3900
3900
|
if (!relative.path) {
|
|
3901
|
-
target.path =
|
|
3901
|
+
target.path = base3.path;
|
|
3902
3902
|
if (relative.query !== void 0) {
|
|
3903
3903
|
target.query = relative.query;
|
|
3904
3904
|
} else {
|
|
3905
|
-
target.query =
|
|
3905
|
+
target.query = base3.query;
|
|
3906
3906
|
}
|
|
3907
3907
|
} else {
|
|
3908
3908
|
if (relative.path[0] === "/") {
|
|
3909
3909
|
target.path = removeDotSegments(relative.path);
|
|
3910
3910
|
} else {
|
|
3911
|
-
if ((
|
|
3911
|
+
if ((base3.userinfo !== void 0 || base3.host !== void 0 || base3.port !== void 0) && !base3.path) {
|
|
3912
3912
|
target.path = "/" + relative.path;
|
|
3913
|
-
} else if (!
|
|
3913
|
+
} else if (!base3.path) {
|
|
3914
3914
|
target.path = relative.path;
|
|
3915
3915
|
} else {
|
|
3916
|
-
target.path =
|
|
3916
|
+
target.path = base3.path.slice(0, base3.path.lastIndexOf("/") + 1) + relative.path;
|
|
3917
3917
|
}
|
|
3918
3918
|
target.path = removeDotSegments(target.path);
|
|
3919
3919
|
}
|
|
3920
3920
|
target.query = relative.query;
|
|
3921
3921
|
}
|
|
3922
|
-
target.userinfo =
|
|
3923
|
-
target.host =
|
|
3924
|
-
target.port =
|
|
3922
|
+
target.userinfo = base3.userinfo;
|
|
3923
|
+
target.host = base3.host;
|
|
3924
|
+
target.port = base3.port;
|
|
3925
3925
|
}
|
|
3926
|
-
target.scheme =
|
|
3926
|
+
target.scheme = base3.scheme;
|
|
3927
3927
|
}
|
|
3928
3928
|
target.fragment = relative.fragment;
|
|
3929
3929
|
return target;
|
|
@@ -12172,14 +12172,14 @@ var memo = {
|
|
|
12172
12172
|
var _a3;
|
|
12173
12173
|
(_a3 = inst._zod).deferred ?? (_a3.deferred = []);
|
|
12174
12174
|
inst._zod.deferred.push(() => {
|
|
12175
|
-
const
|
|
12175
|
+
const base3 = inst._zod.parse;
|
|
12176
12176
|
const wrapped = (payload, ctx) => {
|
|
12177
12177
|
if (ctx.direction !== "backward" && isBackEdge(ctx, payload.value))
|
|
12178
12178
|
throw new $ZodCyclicError();
|
|
12179
|
-
return
|
|
12179
|
+
return base3(payload, ctx);
|
|
12180
12180
|
};
|
|
12181
12181
|
inst._zod.parse = wrapped;
|
|
12182
|
-
if (inst._zod.run ===
|
|
12182
|
+
if (inst._zod.run === base3)
|
|
12183
12183
|
inst._zod.run = wrapped;
|
|
12184
12184
|
});
|
|
12185
12185
|
},
|
|
@@ -12191,15 +12191,15 @@ var memo = {
|
|
|
12191
12191
|
let lastBucket;
|
|
12192
12192
|
(_a3 = inst._zod).deferred ?? (_a3.deferred = []);
|
|
12193
12193
|
inst._zod.deferred.push(() => {
|
|
12194
|
-
const
|
|
12194
|
+
const base3 = inst._zod.parse;
|
|
12195
12195
|
const wrapped = (payload, ctx) => {
|
|
12196
12196
|
if (isRecursiveInst === void 0) {
|
|
12197
12197
|
const walked = isRecursive(inst, /* @__PURE__ */ new Set(), false);
|
|
12198
12198
|
if (walked === NONE) {
|
|
12199
|
-
inst._zod.parse =
|
|
12199
|
+
inst._zod.parse = base3;
|
|
12200
12200
|
if (inst._zod.run === wrapped)
|
|
12201
|
-
inst._zod.run =
|
|
12202
|
-
return
|
|
12201
|
+
inst._zod.run = base3;
|
|
12202
|
+
return base3(payload, ctx);
|
|
12203
12203
|
}
|
|
12204
12204
|
if (walked === PROVEN || rechecked)
|
|
12205
12205
|
isRecursiveInst = true;
|
|
@@ -12208,7 +12208,7 @@ var memo = {
|
|
|
12208
12208
|
}
|
|
12209
12209
|
const input2 = payload.value;
|
|
12210
12210
|
if (!isRef(input2))
|
|
12211
|
-
return
|
|
12211
|
+
return base3(payload, ctx);
|
|
12212
12212
|
let state = ctx[STATE];
|
|
12213
12213
|
if (!state) {
|
|
12214
12214
|
state = { buckets: /* @__PURE__ */ new WeakMap(), backEdges: void 0 };
|
|
@@ -12237,7 +12237,7 @@ var memo = {
|
|
|
12237
12237
|
}
|
|
12238
12238
|
handoff = bucket;
|
|
12239
12239
|
const depth = open.length;
|
|
12240
|
-
const result =
|
|
12240
|
+
const result = base3(payload, ctx);
|
|
12241
12241
|
handoff = void 0;
|
|
12242
12242
|
const entry = open.length > depth ? open.pop() : void 0;
|
|
12243
12243
|
if (result instanceof Promise) {
|
|
@@ -12252,7 +12252,7 @@ var memo = {
|
|
|
12252
12252
|
return result;
|
|
12253
12253
|
};
|
|
12254
12254
|
inst._zod.parse = wrapped;
|
|
12255
|
-
if (inst._zod.run ===
|
|
12255
|
+
if (inst._zod.run === base3)
|
|
12256
12256
|
inst._zod.run = wrapped;
|
|
12257
12257
|
});
|
|
12258
12258
|
}
|
|
@@ -28408,6 +28408,11 @@ var ALPHA_NUMERIC = new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0
|
|
|
28408
28408
|
// ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_@cfworker+json-schema@4.1.1_supports-color@10.2.2_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js
|
|
28409
28409
|
var import_ajv_formats = __toESM(require_dist(), 1);
|
|
28410
28410
|
|
|
28411
|
+
// ../bus-protocol/src/caps.ts
|
|
28412
|
+
var MAX_CAPS = 16;
|
|
28413
|
+
var CapTokenSchema = external_exports.string().regex(/^[a-z][a-z0-9_-]{0,31}$/);
|
|
28414
|
+
var CapsSchema = external_exports.array(CapTokenSchema).max(MAX_CAPS).refine((a) => new Set(a).size === a.length, "duplicate caps");
|
|
28415
|
+
|
|
28411
28416
|
// ../bus-protocol/src/limits.ts
|
|
28412
28417
|
var KB = 1024;
|
|
28413
28418
|
var LIMITS = {
|
|
@@ -28457,6 +28462,8 @@ var MAILBOX_PENDING_CAP = 200;
|
|
|
28457
28462
|
var MAILBOX_BYTES_CAP = 10 * 1024 * 1024;
|
|
28458
28463
|
var HUB_MAILBOX_BYTES_CAP = 1024 * 1024 * 1024;
|
|
28459
28464
|
var enc = new TextEncoder();
|
|
28465
|
+
var utf8Bytes = (s) => enc.encode(s).length;
|
|
28466
|
+
var utf8Exceeds = (s, max) => s.length > max || utf8Bytes(s) > max;
|
|
28460
28467
|
|
|
28461
28468
|
// ../bus-protocol/src/namespace.ts
|
|
28462
28469
|
function fnv8(s) {
|
|
@@ -28802,6 +28809,371 @@ var receiptShape = {
|
|
|
28802
28809
|
};
|
|
28803
28810
|
var ReceiptSchema = external_exports.strictObject(receiptShape).refine(receiptReasonMatchesState, "reason does not match state");
|
|
28804
28811
|
|
|
28812
|
+
// ../bus-protocol/src/rename.ts
|
|
28813
|
+
var NAME_KINDS = ["default", "chosen"];
|
|
28814
|
+
var NameKindSchema = external_exports.enum(NAME_KINDS);
|
|
28815
|
+
var FormerNameSchema = external_exports.strictObject({
|
|
28816
|
+
name: BusNameSchema,
|
|
28817
|
+
expires_at: IsoTimeSchema
|
|
28818
|
+
});
|
|
28819
|
+
var FormerNamesSchema = external_exports.array(FormerNameSchema).min(1).max(LIMITS.maxFormerNames);
|
|
28820
|
+
|
|
28821
|
+
// ../bus-protocol/src/protocol.ts
|
|
28822
|
+
var isWellFormed = (s) => s.isWellFormed();
|
|
28823
|
+
var WellFormedText = external_exports.string().refine(isWellFormed, "not well-formed Unicode");
|
|
28824
|
+
var FrameIdSchema = external_exports.string().regex(/^[A-Za-z0-9_-]{1,64}$/);
|
|
28825
|
+
var base = { v: external_exports.literal(1), id: FrameIdSchema };
|
|
28826
|
+
var BodySchema = WellFormedText.refine(
|
|
28827
|
+
(s) => !utf8Exceeds(s, LIMITS.maxMessageBytes),
|
|
28828
|
+
"body too large"
|
|
28829
|
+
);
|
|
28830
|
+
var InlineBodySchema = WellFormedText.refine(
|
|
28831
|
+
(s) => !utf8Exceeds(s, LIMITS.inlineBodyBytes),
|
|
28832
|
+
"inline body too large"
|
|
28833
|
+
);
|
|
28834
|
+
var distinct = (a) => new Set(a).size === a.length;
|
|
28835
|
+
var Hello = external_exports.strictObject({
|
|
28836
|
+
...base,
|
|
28837
|
+
type: external_exports.literal("hello"),
|
|
28838
|
+
machine_label: MachineLabelSchema,
|
|
28839
|
+
client_version: WellFormedText.pipe(external_exports.string().min(1).max(64)),
|
|
28840
|
+
/**
|
|
28841
|
+
* Capability tokens (`BUS_CAPS`, caps.ts): the hub gates new fields on
|
|
28842
|
+
* them, e.g. roster `former_names` on `rename`. Unknown tokens are ignored.
|
|
28843
|
+
* A hub decoder older than this field refuses a hello carrying it (client
|
|
28844
|
+
* frames are strict), so a client sends it only to hubs that accept it.
|
|
28845
|
+
*/
|
|
28846
|
+
caps: CapsSchema.optional()
|
|
28847
|
+
});
|
|
28848
|
+
var AgentUp = external_exports.strictObject({
|
|
28849
|
+
...base,
|
|
28850
|
+
type: external_exports.literal("agent_up"),
|
|
28851
|
+
agent_ref: AgentRefSchema,
|
|
28852
|
+
kind: AgentKindSchema,
|
|
28853
|
+
proposed_name: WellFormedText.pipe(external_exports.string().max(256)),
|
|
28854
|
+
namespace: WireNamespaceSchema,
|
|
28855
|
+
global: external_exports.boolean(),
|
|
28856
|
+
/**
|
|
28857
|
+
* Whose name `proposed_name` is (#393). Absent means `chosen`. A hub
|
|
28858
|
+
* decoder older than this field refuses the unknown key, so a client sends
|
|
28859
|
+
* it only to hubs that accept it.
|
|
28860
|
+
*/
|
|
28861
|
+
name_kind: NameKindSchema.optional(),
|
|
28862
|
+
/**
|
|
28863
|
+
* #1295: the agent_ref this one takes over from, after a /clear: the same
|
|
28864
|
+
* live process now reports a new session. The hub honours it only for a
|
|
28865
|
+
* socket whose hello listed `BUS_CAPS.mailbox`, when the old ref is an
|
|
28866
|
+
* agent of the same machine; the new ref then inherits the old address
|
|
28867
|
+
* (name, former names) and its pending mail, instead of `<name>-2`. A hub
|
|
28868
|
+
* decoder older than this field refuses the key, so a client sends it only
|
|
28869
|
+
* after `hello_ok.caps` listed `mailbox`.
|
|
28870
|
+
*/
|
|
28871
|
+
replaces: AgentRefSchema.optional()
|
|
28872
|
+
});
|
|
28873
|
+
var AgentDown = external_exports.strictObject({
|
|
28874
|
+
...base,
|
|
28875
|
+
type: external_exports.literal("agent_down"),
|
|
28876
|
+
agent_ref: AgentRefSchema
|
|
28877
|
+
});
|
|
28878
|
+
var Sessions = external_exports.strictObject({
|
|
28879
|
+
...base,
|
|
28880
|
+
type: external_exports.literal("sessions"),
|
|
28881
|
+
open: external_exports.array(AgentRefSchema).max(LIMITS.maxRosterAgents),
|
|
28882
|
+
closed: external_exports.array(AgentRefSchema).max(LIMITS.maxRosterAgents)
|
|
28883
|
+
}).refine((f) => {
|
|
28884
|
+
if (!distinct(f.open) || !distinct(f.closed)) return false;
|
|
28885
|
+
const open2 = new Set(f.open);
|
|
28886
|
+
return !f.closed.some((r) => open2.has(r));
|
|
28887
|
+
}, "duplicate or overlapping session refs");
|
|
28888
|
+
var Send = external_exports.strictObject({
|
|
28889
|
+
...base,
|
|
28890
|
+
type: external_exports.literal("send"),
|
|
28891
|
+
from_ref: AgentRefSchema,
|
|
28892
|
+
to_name: BusNameSchema,
|
|
28893
|
+
to_namespace: WireNamespaceSchema.optional(),
|
|
28894
|
+
/**
|
|
28895
|
+
* A reply to one agent: the `from_id` of the mail it answers. The hub
|
|
28896
|
+
* delivers only when `to_name` still resolves to that agent; otherwise it
|
|
28897
|
+
* refuses `agent_gone`, so an answer never reaches whoever took the name.
|
|
28898
|
+
*/
|
|
28899
|
+
to_id: IdSchema.optional(),
|
|
28900
|
+
body: BodySchema
|
|
28901
|
+
});
|
|
28902
|
+
var Ack = external_exports.strictObject({
|
|
28903
|
+
...base,
|
|
28904
|
+
type: external_exports.literal("ack"),
|
|
28905
|
+
msg_id: MsgIdSchema
|
|
28906
|
+
});
|
|
28907
|
+
var Refuse = external_exports.strictObject({
|
|
28908
|
+
...base,
|
|
28909
|
+
type: external_exports.literal("refuse"),
|
|
28910
|
+
msg_id: MsgIdSchema,
|
|
28911
|
+
reason: external_exports.literal("closed"),
|
|
28912
|
+
detail: external_exports.enum(["denied", "refused", "expired", "dropped"])
|
|
28913
|
+
});
|
|
28914
|
+
var List = external_exports.strictObject({
|
|
28915
|
+
...base,
|
|
28916
|
+
type: external_exports.literal("list"),
|
|
28917
|
+
from_ref: AgentRefSchema
|
|
28918
|
+
});
|
|
28919
|
+
var Fetch = external_exports.strictObject({
|
|
28920
|
+
...base,
|
|
28921
|
+
type: external_exports.literal("fetch"),
|
|
28922
|
+
from_ref: AgentRefSchema,
|
|
28923
|
+
msg_id: MsgIdSchema
|
|
28924
|
+
});
|
|
28925
|
+
var Status = external_exports.strictObject({
|
|
28926
|
+
...base,
|
|
28927
|
+
type: external_exports.literal("status"),
|
|
28928
|
+
from_ref: AgentRefSchema,
|
|
28929
|
+
state: StatusStateSchema,
|
|
28930
|
+
label: StatusLabelSchema.optional()
|
|
28931
|
+
});
|
|
28932
|
+
var Rename = external_exports.strictObject({
|
|
28933
|
+
...base,
|
|
28934
|
+
type: external_exports.literal("rename"),
|
|
28935
|
+
agent_ref: AgentRefSchema,
|
|
28936
|
+
proposed_name: WellFormedText.pipe(external_exports.string().min(1).max(256)),
|
|
28937
|
+
/** A tool rename is `chosen`; a harness reverting to its fallback is `default`. Absent means `chosen`. */
|
|
28938
|
+
name_kind: NameKindSchema.optional()
|
|
28939
|
+
});
|
|
28940
|
+
var FollowRefSchema = WellFormedText.pipe(external_exports.string().min(1).max(2048));
|
|
28941
|
+
var Follow = external_exports.strictObject({
|
|
28942
|
+
...base,
|
|
28943
|
+
type: external_exports.literal("follow"),
|
|
28944
|
+
from_ref: AgentRefSchema,
|
|
28945
|
+
artifact: FollowRefSchema
|
|
28946
|
+
});
|
|
28947
|
+
var Unfollow = external_exports.strictObject({
|
|
28948
|
+
...base,
|
|
28949
|
+
type: external_exports.literal("unfollow"),
|
|
28950
|
+
from_ref: AgentRefSchema,
|
|
28951
|
+
artifact: FollowRefSchema
|
|
28952
|
+
});
|
|
28953
|
+
var Following = external_exports.strictObject({
|
|
28954
|
+
...base,
|
|
28955
|
+
type: external_exports.literal("following"),
|
|
28956
|
+
from_ref: AgentRefSchema
|
|
28957
|
+
});
|
|
28958
|
+
var LinkProofSchema = external_exports.string().regex(/^[A-Za-z0-9_-]{43}$/);
|
|
28959
|
+
var LinkProofHashSchema = external_exports.string().regex(/^[0-9a-f]{64}$/);
|
|
28960
|
+
var LinkBind = external_exports.strictObject({
|
|
28961
|
+
...base,
|
|
28962
|
+
type: external_exports.literal("link_bind"),
|
|
28963
|
+
agent_ref: AgentRefSchema,
|
|
28964
|
+
hash: LinkProofHashSchema
|
|
28965
|
+
});
|
|
28966
|
+
var LinkBound = external_exports.strictObject({
|
|
28967
|
+
...base,
|
|
28968
|
+
type: external_exports.literal("link_bound")
|
|
28969
|
+
});
|
|
28970
|
+
var MAX_FOLLOWS = 200;
|
|
28971
|
+
var FollowEntry = external_exports.strictObject({
|
|
28972
|
+
artifact_id: external_exports.string().min(1).max(64),
|
|
28973
|
+
url: external_exports.string().min(1).max(2048),
|
|
28974
|
+
followed_at: IsoTimeSchema
|
|
28975
|
+
});
|
|
28976
|
+
var Followed = external_exports.strictObject({
|
|
28977
|
+
...base,
|
|
28978
|
+
type: external_exports.literal("followed"),
|
|
28979
|
+
...FollowEntry.shape
|
|
28980
|
+
});
|
|
28981
|
+
var Unfollowed = external_exports.strictObject({
|
|
28982
|
+
...base,
|
|
28983
|
+
type: external_exports.literal("unfollowed"),
|
|
28984
|
+
removed: external_exports.boolean()
|
|
28985
|
+
});
|
|
28986
|
+
var Follows = external_exports.strictObject({
|
|
28987
|
+
...base,
|
|
28988
|
+
type: external_exports.literal("follows"),
|
|
28989
|
+
follows: external_exports.array(FollowEntry).max(MAX_FOLLOWS)
|
|
28990
|
+
});
|
|
28991
|
+
var HelloOk = external_exports.strictObject({
|
|
28992
|
+
...base,
|
|
28993
|
+
type: external_exports.literal("hello_ok"),
|
|
28994
|
+
machine_id: external_exports.string().regex(/^[1-9A-HJ-NP-Za-km-z]{16}$/),
|
|
28995
|
+
machine_label: MachineLabelSchema,
|
|
28996
|
+
server_version: WellFormedText.pipe(external_exports.string().max(1024)),
|
|
28997
|
+
/**
|
|
28998
|
+
* What the hub supports (`BUS_CAPS`), sent only to a socket whose hello
|
|
28999
|
+
* listed caps, so a client that never sends caps never sees it.
|
|
29000
|
+
*/
|
|
29001
|
+
caps: CapsSchema.optional()
|
|
29002
|
+
});
|
|
29003
|
+
var AgentOk = external_exports.strictObject({
|
|
29004
|
+
...base,
|
|
29005
|
+
type: external_exports.literal("agent_ok"),
|
|
29006
|
+
agent_ref: AgentRefSchema,
|
|
29007
|
+
bus_name: BusNameSchema
|
|
29008
|
+
});
|
|
29009
|
+
var Renamed = external_exports.strictObject({
|
|
29010
|
+
...base,
|
|
29011
|
+
type: external_exports.literal("renamed"),
|
|
29012
|
+
agent_ref: AgentRefSchema,
|
|
29013
|
+
bus_name: BusNameSchema,
|
|
29014
|
+
former: BusNameSchema.optional()
|
|
29015
|
+
});
|
|
29016
|
+
var ReceiptFrame = external_exports.strictObject({ ...base, type: external_exports.literal("receipt"), ...receiptShape }).refine(receiptReasonMatchesState, "reason does not match state").refine(
|
|
29017
|
+
(f) => f.state === "pending" || f.state === "refused",
|
|
29018
|
+
"send receipt is pending or refused"
|
|
29019
|
+
);
|
|
29020
|
+
var RosterAgent = external_exports.strictObject({
|
|
29021
|
+
bus_name: BusNameSchema,
|
|
29022
|
+
/** Any kind token, so a future kind never fails the whole roster. Shown by its own token. */
|
|
29023
|
+
kind: KindTokenSchema,
|
|
29024
|
+
namespace: WireNamespaceSchema,
|
|
29025
|
+
global: external_exports.boolean(),
|
|
29026
|
+
/**
|
|
29027
|
+
* `live`: machine connected. `queued`: machine disconnected but the session
|
|
29028
|
+
* was last reported open (mail waits). `away` (#1295, cap-gated): closed,
|
|
29029
|
+
* its mailbox kept for 7 d. Other closed agents are omitted.
|
|
29030
|
+
*/
|
|
29031
|
+
state: external_exports.enum(["live", "queued", "away"]),
|
|
29032
|
+
/**
|
|
29033
|
+
* When an `away` agent closed (#1295). Sent, with `state: "away"`, only to
|
|
29034
|
+
* a socket whose hello listed `BUS_CAPS.mailbox`: a decoder older than
|
|
29035
|
+
* either refuses the row, and with it the whole roster.
|
|
29036
|
+
*/
|
|
29037
|
+
since: IsoTimeSchema.optional(),
|
|
29038
|
+
/** The agent's machine label. */
|
|
29039
|
+
machine_label: MachineLabelSchema.optional(),
|
|
29040
|
+
/** Self-reported ("agent says"); cleared on close. */
|
|
29041
|
+
status: StatusStateSchema.optional(),
|
|
29042
|
+
status_label: StatusLabelSchema.optional(),
|
|
29043
|
+
status_at: IsoTimeSchema.optional(),
|
|
29044
|
+
/**
|
|
29045
|
+
* Names the agent left that still reach it (#393). Sent only to a socket
|
|
29046
|
+
* whose hello listed `BUS_CAPS.rename`: a decoder older than this field
|
|
29047
|
+
* refuses the row, and with it the whole roster.
|
|
29048
|
+
*/
|
|
29049
|
+
former_names: FormerNamesSchema.optional()
|
|
29050
|
+
});
|
|
29051
|
+
var Roster = external_exports.strictObject({
|
|
29052
|
+
...base,
|
|
29053
|
+
type: external_exports.literal("roster"),
|
|
29054
|
+
agents: external_exports.array(RosterAgent).max(LIMITS.maxRosterAgents)
|
|
29055
|
+
});
|
|
29056
|
+
var BodyFrame = external_exports.strictObject({
|
|
29057
|
+
...base,
|
|
29058
|
+
type: external_exports.literal("body"),
|
|
29059
|
+
msg_id: MsgIdSchema,
|
|
29060
|
+
body: BodySchema
|
|
29061
|
+
});
|
|
29062
|
+
var ErrorFrame = external_exports.strictObject({
|
|
29063
|
+
...base,
|
|
29064
|
+
type: external_exports.literal("error"),
|
|
29065
|
+
code: external_exports.enum([
|
|
29066
|
+
"bad_frame",
|
|
29067
|
+
"not_registered",
|
|
29068
|
+
"not_found",
|
|
29069
|
+
"too_large",
|
|
29070
|
+
"rate_limited",
|
|
29071
|
+
"internal",
|
|
29072
|
+
/** Only to a socket whose hello listed `BUS_CAPS.follow` (#1317). */
|
|
29073
|
+
"follow_limit"
|
|
29074
|
+
]),
|
|
29075
|
+
message: WellFormedText.pipe(external_exports.string().max(1024))
|
|
29076
|
+
});
|
|
29077
|
+
var Notice = external_exports.strictObject({
|
|
29078
|
+
size: external_exports.number().int().gt(LIMITS.inlineBodyBytes).max(LIMITS.maxMessageBytes),
|
|
29079
|
+
msg_id: MsgIdSchema
|
|
29080
|
+
});
|
|
29081
|
+
var Deliver = external_exports.strictObject({
|
|
29082
|
+
...base,
|
|
29083
|
+
type: external_exports.literal("deliver"),
|
|
29084
|
+
msg_id: MsgIdSchema,
|
|
29085
|
+
to_ref: AgentRefSchema,
|
|
29086
|
+
/**
|
|
29087
|
+
* The sender's name, or the instance's reserved sender (#1317: the hub's
|
|
29088
|
+
* server notices). Only a server frame carries the reserved name: every
|
|
29089
|
+
* name an agent can send or register still refuses it (BusNameSchema).
|
|
29090
|
+
*/
|
|
29091
|
+
from_name: external_exports.union([BusNameSchema, external_exports.literal(INSTANCE_SENDER_NAME)]),
|
|
29092
|
+
/** The sender's agent id on the hub: a reply names it as `to_id`. */
|
|
29093
|
+
from_id: IdSchema.optional(),
|
|
29094
|
+
/** The SENDER's namespace, so a reply can set `to_namespace` from it. */
|
|
29095
|
+
namespace: WireNamespaceSchema,
|
|
29096
|
+
body: InlineBodySchema.optional(),
|
|
29097
|
+
notice: Notice.optional()
|
|
29098
|
+
}).refine(
|
|
29099
|
+
(f) => f.body === void 0 !== (f.notice === void 0),
|
|
29100
|
+
"body xor notice"
|
|
29101
|
+
).refine(
|
|
29102
|
+
(f) => f.notice === void 0 || f.notice.msg_id === f.msg_id,
|
|
29103
|
+
"notice msg_id mismatch"
|
|
29104
|
+
);
|
|
29105
|
+
var ReceiptUpdate = external_exports.strictObject({ ...base, type: external_exports.literal("receipt_update"), ...receiptShape }).refine(receiptReasonMatchesState, "reason does not match state");
|
|
29106
|
+
var RosterChanged = external_exports.strictObject({
|
|
29107
|
+
...base,
|
|
29108
|
+
type: external_exports.literal("roster_changed"),
|
|
29109
|
+
namespace: WireNamespaceSchema
|
|
29110
|
+
});
|
|
29111
|
+
var ClientFrameSchema = external_exports.discriminatedUnion("type", [
|
|
29112
|
+
Hello,
|
|
29113
|
+
AgentUp,
|
|
29114
|
+
AgentDown,
|
|
29115
|
+
Sessions,
|
|
29116
|
+
Send,
|
|
29117
|
+
Ack,
|
|
29118
|
+
Refuse,
|
|
29119
|
+
List,
|
|
29120
|
+
Fetch,
|
|
29121
|
+
Status,
|
|
29122
|
+
Rename,
|
|
29123
|
+
Follow,
|
|
29124
|
+
Unfollow,
|
|
29125
|
+
Following,
|
|
29126
|
+
LinkBind
|
|
29127
|
+
]);
|
|
29128
|
+
var ServerFrameSchema = external_exports.discriminatedUnion("type", [
|
|
29129
|
+
HelloOk,
|
|
29130
|
+
AgentOk,
|
|
29131
|
+
ReceiptFrame,
|
|
29132
|
+
Roster,
|
|
29133
|
+
BodyFrame,
|
|
29134
|
+
ErrorFrame,
|
|
29135
|
+
Deliver,
|
|
29136
|
+
ReceiptUpdate,
|
|
29137
|
+
RosterChanged,
|
|
29138
|
+
Renamed,
|
|
29139
|
+
Followed,
|
|
29140
|
+
Unfollowed,
|
|
29141
|
+
Follows,
|
|
29142
|
+
LinkBound
|
|
29143
|
+
]);
|
|
29144
|
+
var FrameSchema = external_exports.discriminatedUnion("type", [
|
|
29145
|
+
Hello,
|
|
29146
|
+
AgentUp,
|
|
29147
|
+
AgentDown,
|
|
29148
|
+
Sessions,
|
|
29149
|
+
Send,
|
|
29150
|
+
Ack,
|
|
29151
|
+
Refuse,
|
|
29152
|
+
List,
|
|
29153
|
+
Fetch,
|
|
29154
|
+
Status,
|
|
29155
|
+
Rename,
|
|
29156
|
+
Follow,
|
|
29157
|
+
Unfollow,
|
|
29158
|
+
Following,
|
|
29159
|
+
LinkBind,
|
|
29160
|
+
HelloOk,
|
|
29161
|
+
AgentOk,
|
|
29162
|
+
ReceiptFrame,
|
|
29163
|
+
Roster,
|
|
29164
|
+
BodyFrame,
|
|
29165
|
+
ErrorFrame,
|
|
29166
|
+
Deliver,
|
|
29167
|
+
ReceiptUpdate,
|
|
29168
|
+
RosterChanged,
|
|
29169
|
+
Renamed,
|
|
29170
|
+
Followed,
|
|
29171
|
+
Unfollowed,
|
|
29172
|
+
Follows,
|
|
29173
|
+
LinkBound
|
|
29174
|
+
]);
|
|
29175
|
+
var MAX_RAW_FRAME_CHARS = 2 * LIMITS.maxMessageBytes + 4096;
|
|
29176
|
+
|
|
28805
29177
|
// ../bus-ipc/src/client.ts
|
|
28806
29178
|
import { connect } from "node:net";
|
|
28807
29179
|
|
|
@@ -28813,16 +29185,16 @@ var INLINE_CAP_BYTES = 32 * 1024;
|
|
|
28813
29185
|
var KIND = AgentKindSchema;
|
|
28814
29186
|
var KIND_TOKEN = KindTokenSchema;
|
|
28815
29187
|
var AGENT_REF = AgentRefSchema;
|
|
28816
|
-
var
|
|
29188
|
+
var base2 = { v: external_exports.literal(V), id: external_exports.string().min(1).max(64) };
|
|
28817
29189
|
var late = { late: external_exports.array(external_exports.string().min(1)).optional() };
|
|
28818
|
-
var
|
|
29190
|
+
var isWellFormed2 = (s) => s.isWellFormed();
|
|
28819
29191
|
var WELL_FORMED = { message: "text is not well-formed unicode" };
|
|
28820
|
-
var CLIENT_VERSION = true ? "0.
|
|
29192
|
+
var CLIENT_VERSION = true ? "0.145.0" : "0.0.0";
|
|
28821
29193
|
var clientVersion = {
|
|
28822
29194
|
client_version: external_exports.string().min(1).max(64).optional()
|
|
28823
29195
|
};
|
|
28824
|
-
var
|
|
28825
|
-
...
|
|
29196
|
+
var Hello2 = external_exports.object({
|
|
29197
|
+
...base2,
|
|
28826
29198
|
...clientVersion,
|
|
28827
29199
|
type: external_exports.literal("hello"),
|
|
28828
29200
|
kind: KIND,
|
|
@@ -28834,7 +29206,7 @@ var Hello = external_exports.object({
|
|
|
28834
29206
|
* (C26j); the daemon refuses any other kind without one.
|
|
28835
29207
|
*/
|
|
28836
29208
|
cwd: external_exports.string().min(1).max(4096).optional(),
|
|
28837
|
-
proposed_name: external_exports.string().min(1).max(64).refine(
|
|
29209
|
+
proposed_name: external_exports.string().min(1).max(64).refine(isWellFormed2, WELL_FORMED).optional(),
|
|
28838
29210
|
/** What this adapter can decode (ADAPTER_CAPS); absent means none. */
|
|
28839
29211
|
caps: external_exports.array(external_exports.string().max(32)).max(16).optional(),
|
|
28840
29212
|
/** What the harness told the adapter, re-checked by the daemon. */
|
|
@@ -28872,20 +29244,20 @@ var Hello = external_exports.object({
|
|
|
28872
29244
|
}).optional()
|
|
28873
29245
|
});
|
|
28874
29246
|
var optIn = { late: external_exports.literal(true).optional() };
|
|
28875
|
-
var
|
|
28876
|
-
...
|
|
29247
|
+
var Send2 = external_exports.object({
|
|
29248
|
+
...base2,
|
|
28877
29249
|
...optIn,
|
|
28878
29250
|
type: external_exports.literal("send"),
|
|
28879
|
-
to: BusNameSchema.refine(
|
|
29251
|
+
to: BusNameSchema.refine(isWellFormed2, WELL_FORMED),
|
|
28880
29252
|
/** The target's namespace, for a global sender; forwarded as `to_namespace`. */
|
|
28881
|
-
namespace: WireNamespaceSchema.refine(
|
|
29253
|
+
namespace: WireNamespaceSchema.refine(isWellFormed2, WELL_FORMED).optional(),
|
|
28882
29254
|
body: external_exports.string().min(1).refine((b) => Buffer.byteLength(b, "utf8") <= MAX_BODY_BYTES, {
|
|
28883
29255
|
message: `body exceeds ${MAX_BODY_BYTES} bytes`
|
|
28884
|
-
}).refine(
|
|
29256
|
+
}).refine(isWellFormed2, WELL_FORMED)
|
|
28885
29257
|
});
|
|
28886
|
-
var
|
|
29258
|
+
var List2 = external_exports.object({ ...base2, ...optIn, type: external_exports.literal("list") });
|
|
28887
29259
|
var Self = external_exports.object({
|
|
28888
|
-
...
|
|
29260
|
+
...base2,
|
|
28889
29261
|
...optIn,
|
|
28890
29262
|
type: external_exports.literal("self"),
|
|
28891
29263
|
/**
|
|
@@ -28894,73 +29266,79 @@ var Self = external_exports.object({
|
|
|
28894
29266
|
*/
|
|
28895
29267
|
row: external_exports.literal(true).optional()
|
|
28896
29268
|
});
|
|
28897
|
-
var
|
|
28898
|
-
...
|
|
29269
|
+
var Fetch2 = external_exports.object({
|
|
29270
|
+
...base2,
|
|
28899
29271
|
...optIn,
|
|
28900
29272
|
type: external_exports.literal("fetch"),
|
|
28901
29273
|
msg_id: MsgIdSchema
|
|
28902
29274
|
});
|
|
28903
|
-
var
|
|
28904
|
-
...
|
|
29275
|
+
var Ack2 = external_exports.object({
|
|
29276
|
+
...base2,
|
|
28905
29277
|
type: external_exports.literal("ack"),
|
|
28906
29278
|
msg_id: MsgIdSchema
|
|
28907
29279
|
});
|
|
28908
29280
|
var SetStatus = external_exports.object({
|
|
28909
|
-
...
|
|
29281
|
+
...base2,
|
|
28910
29282
|
...optIn,
|
|
28911
29283
|
type: external_exports.literal("set_status"),
|
|
28912
29284
|
state: StatusStateSchema,
|
|
28913
29285
|
label: StatusLabelSchema.optional()
|
|
28914
29286
|
});
|
|
28915
|
-
var
|
|
28916
|
-
...
|
|
29287
|
+
var Rename2 = external_exports.object({
|
|
29288
|
+
...base2,
|
|
28917
29289
|
...optIn,
|
|
28918
29290
|
type: external_exports.literal("rename"),
|
|
28919
|
-
name: external_exports.string().min(1).max(64).refine(
|
|
29291
|
+
name: external_exports.string().min(1).max(64).refine(isWellFormed2, WELL_FORMED)
|
|
28920
29292
|
});
|
|
28921
|
-
var
|
|
28922
|
-
...
|
|
29293
|
+
var Follow2 = external_exports.object({
|
|
29294
|
+
...base2,
|
|
28923
29295
|
...optIn,
|
|
28924
29296
|
type: external_exports.literal("follow"),
|
|
28925
|
-
artifact: external_exports.string().min(1).max(2048).refine(
|
|
29297
|
+
artifact: external_exports.string().min(1).max(2048).refine(isWellFormed2, WELL_FORMED)
|
|
28926
29298
|
});
|
|
28927
|
-
var
|
|
28928
|
-
...
|
|
29299
|
+
var Unfollow2 = external_exports.object({
|
|
29300
|
+
...base2,
|
|
28929
29301
|
...optIn,
|
|
28930
29302
|
type: external_exports.literal("unfollow"),
|
|
28931
|
-
artifact: external_exports.string().min(1).max(2048).refine(
|
|
29303
|
+
artifact: external_exports.string().min(1).max(2048).refine(isWellFormed2, WELL_FORMED)
|
|
28932
29304
|
});
|
|
28933
|
-
var
|
|
28934
|
-
...
|
|
29305
|
+
var Following2 = external_exports.object({
|
|
29306
|
+
...base2,
|
|
28935
29307
|
...optIn,
|
|
28936
29308
|
type: external_exports.literal("following")
|
|
28937
29309
|
});
|
|
28938
29310
|
var ProposeReach = external_exports.object({
|
|
28939
|
-
...
|
|
29311
|
+
...base2,
|
|
28940
29312
|
...optIn,
|
|
28941
29313
|
type: external_exports.literal("propose_reach"),
|
|
28942
29314
|
namespaces: external_exports.array(WireNamespaceSchema).min(1).max(REACH_PROPOSAL_MAX)
|
|
28943
29315
|
});
|
|
28944
29316
|
var StatusRequest = external_exports.object({
|
|
28945
|
-
...
|
|
29317
|
+
...base2,
|
|
28946
29318
|
...clientVersion,
|
|
28947
29319
|
type: external_exports.literal("status"),
|
|
28948
29320
|
cwd: external_exports.string().min(1).max(4096).optional(),
|
|
28949
29321
|
/** What this client can decode (ADAPTER_CAPS); absent means none. */
|
|
28950
29322
|
caps: external_exports.array(external_exports.string().max(32)).max(16).optional()
|
|
28951
29323
|
});
|
|
29324
|
+
var LinkProofRequest = external_exports.object({
|
|
29325
|
+
...base2,
|
|
29326
|
+
type: external_exports.literal("link_proof"),
|
|
29327
|
+
pid: external_exports.number().int().positive(),
|
|
29328
|
+
hash: LinkProofHashSchema
|
|
29329
|
+
});
|
|
28952
29330
|
var AdapterFrame = external_exports.discriminatedUnion("type", [
|
|
28953
|
-
|
|
28954
|
-
|
|
28955
|
-
|
|
29331
|
+
Hello2,
|
|
29332
|
+
Send2,
|
|
29333
|
+
List2,
|
|
28956
29334
|
Self,
|
|
28957
|
-
|
|
28958
|
-
|
|
29335
|
+
Fetch2,
|
|
29336
|
+
Ack2,
|
|
28959
29337
|
SetStatus,
|
|
28960
|
-
|
|
28961
|
-
|
|
28962
|
-
|
|
28963
|
-
|
|
29338
|
+
Rename2,
|
|
29339
|
+
Follow2,
|
|
29340
|
+
Unfollow2,
|
|
29341
|
+
Following2,
|
|
28964
29342
|
ProposeReach
|
|
28965
29343
|
]);
|
|
28966
29344
|
var ConfigFile = external_exports.object({
|
|
@@ -28994,7 +29372,7 @@ var AgentInfo = external_exports.object({
|
|
|
28994
29372
|
config_files: external_exports.array(ConfigFile).optional()
|
|
28995
29373
|
});
|
|
28996
29374
|
var Welcome = external_exports.object({
|
|
28997
|
-
...
|
|
29375
|
+
...base2,
|
|
28998
29376
|
type: external_exports.literal("welcome"),
|
|
28999
29377
|
agent_ref: AGENT_REF,
|
|
29000
29378
|
bus_name: external_exports.string(),
|
|
@@ -29004,7 +29382,7 @@ var Welcome = external_exports.object({
|
|
|
29004
29382
|
caps: external_exports.array(external_exports.string().max(32)).max(16).optional()
|
|
29005
29383
|
});
|
|
29006
29384
|
var Receipt = external_exports.object({
|
|
29007
|
-
...
|
|
29385
|
+
...base2,
|
|
29008
29386
|
type: external_exports.literal("receipt"),
|
|
29009
29387
|
msg_id: external_exports.string(),
|
|
29010
29388
|
state: external_exports.enum(["pending", "delivered", "expired", "refused"]),
|
|
@@ -29018,64 +29396,64 @@ var Receipt = external_exports.object({
|
|
|
29018
29396
|
text: external_exports.string().min(1).optional(),
|
|
29019
29397
|
...late
|
|
29020
29398
|
});
|
|
29021
|
-
var
|
|
29022
|
-
...
|
|
29399
|
+
var Roster2 = external_exports.object({
|
|
29400
|
+
...base2,
|
|
29023
29401
|
type: external_exports.literal("roster"),
|
|
29024
29402
|
agents: external_exports.array(AgentInfo),
|
|
29025
29403
|
...late
|
|
29026
29404
|
});
|
|
29027
29405
|
var Agent = external_exports.object({
|
|
29028
|
-
...
|
|
29406
|
+
...base2,
|
|
29029
29407
|
type: external_exports.literal("agent"),
|
|
29030
29408
|
agent: AgentInfo.nullable(),
|
|
29031
29409
|
...late
|
|
29032
29410
|
});
|
|
29033
29411
|
var StatusSet = external_exports.object({
|
|
29034
|
-
...
|
|
29412
|
+
...base2,
|
|
29035
29413
|
type: external_exports.literal("status_set"),
|
|
29036
29414
|
/** An earlier status the hub refused, or that never reached it: show it with this result. */
|
|
29037
29415
|
earlier: external_exports.object({ code: external_exports.string(), message: external_exports.string() }).optional(),
|
|
29038
29416
|
...late
|
|
29039
29417
|
});
|
|
29040
|
-
var
|
|
29418
|
+
var FollowEntry2 = external_exports.object({
|
|
29041
29419
|
artifact_id: external_exports.string(),
|
|
29042
29420
|
url: external_exports.string(),
|
|
29043
29421
|
followed_at: external_exports.string()
|
|
29044
29422
|
});
|
|
29045
|
-
var
|
|
29046
|
-
...
|
|
29423
|
+
var Followed2 = external_exports.object({
|
|
29424
|
+
...base2,
|
|
29047
29425
|
type: external_exports.literal("followed"),
|
|
29048
|
-
...
|
|
29426
|
+
...FollowEntry2.shape,
|
|
29049
29427
|
...late
|
|
29050
29428
|
});
|
|
29051
|
-
var
|
|
29052
|
-
...
|
|
29429
|
+
var Unfollowed2 = external_exports.object({
|
|
29430
|
+
...base2,
|
|
29053
29431
|
type: external_exports.literal("unfollowed"),
|
|
29054
29432
|
removed: external_exports.boolean(),
|
|
29055
29433
|
...late
|
|
29056
29434
|
});
|
|
29057
|
-
var
|
|
29058
|
-
...
|
|
29435
|
+
var Follows2 = external_exports.object({
|
|
29436
|
+
...base2,
|
|
29059
29437
|
type: external_exports.literal("follows"),
|
|
29060
|
-
follows: external_exports.array(
|
|
29438
|
+
follows: external_exports.array(FollowEntry2),
|
|
29061
29439
|
...late
|
|
29062
29440
|
});
|
|
29063
29441
|
var ReachProposed = external_exports.object({
|
|
29064
|
-
...
|
|
29442
|
+
...base2,
|
|
29065
29443
|
type: external_exports.literal("reach_proposed"),
|
|
29066
29444
|
confirm_url: external_exports.string(),
|
|
29067
29445
|
expires_at: external_exports.string(),
|
|
29068
29446
|
...late
|
|
29069
29447
|
});
|
|
29070
29448
|
var Body = external_exports.object({
|
|
29071
|
-
...
|
|
29449
|
+
...base2,
|
|
29072
29450
|
type: external_exports.literal("body"),
|
|
29073
29451
|
msg_id: external_exports.string(),
|
|
29074
29452
|
body: external_exports.string(),
|
|
29075
29453
|
...late
|
|
29076
29454
|
});
|
|
29077
|
-
var
|
|
29078
|
-
...
|
|
29455
|
+
var Deliver2 = external_exports.object({
|
|
29456
|
+
...base2,
|
|
29079
29457
|
type: external_exports.literal("deliver"),
|
|
29080
29458
|
msg_id: external_exports.string(),
|
|
29081
29459
|
from_name: external_exports.string(),
|
|
@@ -29085,22 +29463,22 @@ var Deliver = external_exports.object({
|
|
|
29085
29463
|
}).refine((d) => d.body === void 0 !== (d.notice === void 0), {
|
|
29086
29464
|
message: "deliver needs exactly one of body or notice"
|
|
29087
29465
|
});
|
|
29088
|
-
var
|
|
29089
|
-
...
|
|
29466
|
+
var Notice2 = external_exports.object({
|
|
29467
|
+
...base2,
|
|
29090
29468
|
type: external_exports.literal("notice"),
|
|
29091
29469
|
text: external_exports.string().min(1),
|
|
29092
29470
|
/** The message the notice is about. */
|
|
29093
29471
|
msg_id: external_exports.string().optional()
|
|
29094
29472
|
});
|
|
29095
|
-
var
|
|
29096
|
-
...
|
|
29473
|
+
var ErrorFrame2 = external_exports.object({
|
|
29474
|
+
...base2,
|
|
29097
29475
|
type: external_exports.literal("error"),
|
|
29098
29476
|
code: external_exports.string(),
|
|
29099
29477
|
message: external_exports.string(),
|
|
29100
29478
|
...late
|
|
29101
29479
|
});
|
|
29102
29480
|
var StatusReply = external_exports.object({
|
|
29103
|
-
...
|
|
29481
|
+
...base2,
|
|
29104
29482
|
type: external_exports.literal("status"),
|
|
29105
29483
|
pid: external_exports.number().int().positive(),
|
|
29106
29484
|
version: external_exports.string(),
|
|
@@ -29114,6 +29492,8 @@ var StatusReply = external_exports.object({
|
|
|
29114
29492
|
hub_since: external_exports.number().optional(),
|
|
29115
29493
|
/** The hub's `server_version` from its last `hello_ok`. Absent before one, and from older daemons. */
|
|
29116
29494
|
hub_version: external_exports.string().optional(),
|
|
29495
|
+
/** This daemon takes `link_proof` (#1822). Older daemons omit it. */
|
|
29496
|
+
link: external_exports.boolean().optional(),
|
|
29117
29497
|
/** The namespace `cwd` resolves to, when the request named one. */
|
|
29118
29498
|
namespace: external_exports.string().optional(),
|
|
29119
29499
|
/** One roster per namespace: this machine's sessions', or only `cwd`'s. */
|
|
@@ -29148,20 +29528,26 @@ var StatusReply = external_exports.object({
|
|
|
29148
29528
|
})
|
|
29149
29529
|
).optional()
|
|
29150
29530
|
});
|
|
29531
|
+
var LinkProofed = external_exports.object({
|
|
29532
|
+
...base2,
|
|
29533
|
+
type: external_exports.literal("link_proofed"),
|
|
29534
|
+
bound: external_exports.boolean()
|
|
29535
|
+
});
|
|
29151
29536
|
var DaemonFrame = external_exports.discriminatedUnion("type", [
|
|
29537
|
+
LinkProofed,
|
|
29152
29538
|
Welcome,
|
|
29153
29539
|
Receipt,
|
|
29154
|
-
|
|
29540
|
+
Roster2,
|
|
29155
29541
|
Agent,
|
|
29156
29542
|
Body,
|
|
29157
|
-
|
|
29158
|
-
|
|
29159
|
-
|
|
29543
|
+
Deliver2,
|
|
29544
|
+
Notice2,
|
|
29545
|
+
ErrorFrame2,
|
|
29160
29546
|
StatusReply,
|
|
29161
29547
|
StatusSet,
|
|
29162
|
-
|
|
29163
|
-
|
|
29164
|
-
|
|
29548
|
+
Followed2,
|
|
29549
|
+
Unfollowed2,
|
|
29550
|
+
Follows2,
|
|
29165
29551
|
ReachProposed
|
|
29166
29552
|
]);
|
|
29167
29553
|
|
|
@@ -29451,13 +29837,13 @@ function receiptText(r, sentTo, namespaces, excerpt, movedTo2, linkedNs) {
|
|
|
29451
29837
|
}
|
|
29452
29838
|
}
|
|
29453
29839
|
function movedName(to, names) {
|
|
29454
|
-
const
|
|
29840
|
+
const base3 = `${to.toLowerCase()}-`;
|
|
29455
29841
|
let best;
|
|
29456
29842
|
let bestN = Number.POSITIVE_INFINITY;
|
|
29457
29843
|
for (const name of names) {
|
|
29458
29844
|
const l = name.toLowerCase();
|
|
29459
|
-
if (!l.startsWith(
|
|
29460
|
-
const tail = l.slice(
|
|
29845
|
+
if (!l.startsWith(base3)) continue;
|
|
29846
|
+
const tail = l.slice(base3.length);
|
|
29461
29847
|
if (!/^[0-9]+$/.test(tail)) continue;
|
|
29462
29848
|
if (Number(tail) < bestN) {
|
|
29463
29849
|
bestN = Number(tail);
|
|
@@ -30731,8 +31117,8 @@ var placeholder = (v) => {
|
|
|
30731
31117
|
function homeDir(env, home) {
|
|
30732
31118
|
const raw = () => placeholder(env.HOME) ?? placeholder(env.USERPROFILE) ?? placeholder(home());
|
|
30733
31119
|
const explicit = placeholder(env.OPENCLAW_HOME);
|
|
30734
|
-
const
|
|
30735
|
-
return
|
|
31120
|
+
const base3 = explicit ? explicit.replace(/^~(?=$|[\\/])/, raw() ?? "") : raw();
|
|
31121
|
+
return base3 ? resolve2(base3) : resolve2(process.cwd());
|
|
30736
31122
|
}
|
|
30737
31123
|
var userPath = (input2, env, home) => {
|
|
30738
31124
|
const t = input2.trim();
|