@songsid/agend 2.4.0-beta.20 → 2.4.0-beta.21
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/dist/agent-cli-instructions.md +1 -1
- package/dist/backend/claude-carry.d.ts +11 -0
- package/dist/backend/claude-carry.js +88 -6
- package/dist/backend/claude-carry.js.map +1 -1
- package/dist/build-provenance.json +1 -1
- package/dist/channel/mcp-tools.js +6 -4
- package/dist/channel/mcp-tools.js.map +1 -1
- package/dist/contact-change-proposals.d.ts +47 -0
- package/dist/contact-change-proposals.js +131 -0
- package/dist/contact-change-proposals.js.map +1 -0
- package/dist/fleet-manager.d.ts +25 -1
- package/dist/fleet-manager.js +166 -3
- package/dist/fleet-manager.js.map +1 -1
- package/dist/general-knowledge/skills/concepts/SKILL.md +2 -1
- package/dist/general-knowledge/skills/hub/SKILL.md +39 -2
- package/dist/general-knowledge/skills/task-board/SKILL.md +4 -0
- package/dist/general-knowledge/skills/web-appearance/SKILL.md +1 -1
- package/dist/general-knowledge/skills/web-dashboard/SKILL.md +16 -6
- package/dist/hub/agent-pictures-model.d.ts +147 -0
- package/dist/hub/agent-pictures-model.js +64 -0
- package/dist/hub/agent-pictures-model.js.map +1 -0
- package/dist/hub/agent-pictures.d.ts +52 -0
- package/dist/hub/agent-pictures.js +202 -0
- package/dist/hub/agent-pictures.js.map +1 -0
- package/dist/hub/client.d.ts +2 -0
- package/dist/hub/client.js +16 -2
- package/dist/hub/client.js.map +1 -1
- package/dist/hub/compose/member.d.ts +10 -2
- package/dist/hub/compose/member.js +32 -8
- package/dist/hub/compose/member.js.map +1 -1
- package/dist/hub/compose/server.d.ts +1 -0
- package/dist/hub/compose/server.js +4 -2
- package/dist/hub/compose/server.js.map +1 -1
- package/dist/hub/direct-posts-model.d.ts +1 -0
- package/dist/hub/direct-posts-model.js +2 -0
- package/dist/hub/direct-posts-model.js.map +1 -0
- package/dist/hub/direct-posts.d.ts +36 -0
- package/dist/hub/direct-posts.js +145 -0
- package/dist/hub/direct-posts.js.map +1 -0
- package/dist/hub/http/compose.d.ts +2 -0
- package/dist/hub/http/compose.js +155 -19
- package/dist/hub/http/compose.js.map +1 -1
- package/dist/hub/http/core.d.ts +9 -1
- package/dist/hub/http/core.js +21 -1
- package/dist/hub/http/core.js.map +1 -1
- package/dist/hub/http/schema.js +6 -0
- package/dist/hub/http/schema.js.map +1 -1
- package/dist/hub/join/service.d.ts +2 -0
- package/dist/hub/join/service.js +7 -3
- package/dist/hub/join/service.js.map +1 -1
- package/dist/hub/mcp/policy.d.ts +1 -1
- package/dist/hub/member/agent-pictures.d.ts +43 -0
- package/dist/hub/member/agent-pictures.js +125 -0
- package/dist/hub/member/agent-pictures.js.map +1 -0
- package/dist/hub/member/direct-rooms.d.ts +9 -0
- package/dist/hub/member/direct-rooms.js +14 -0
- package/dist/hub/member/direct-rooms.js.map +1 -0
- package/dist/hub/member/room-post.d.ts +11 -10
- package/dist/hub/member/room-post.js +51 -7
- package/dist/hub/member/room-post.js.map +1 -1
- package/dist/hub/policy.d.ts +11 -2
- package/dist/hub/policy.js +60 -7
- package/dist/hub/policy.js.map +1 -1
- package/dist/hub/protocol.d.ts +123 -1
- package/dist/hub/protocol.js +17 -7
- package/dist/hub/protocol.js.map +1 -1
- package/dist/hub/representative.d.ts +28 -0
- package/dist/hub/representative.js +127 -12
- package/dist/hub/representative.js.map +1 -1
- package/dist/hub/rooms/agents.d.ts +2 -0
- package/dist/hub/rooms/agents.js +14 -3
- package/dist/hub/rooms/agents.js.map +1 -1
- package/dist/hub/rooms/direct-view.d.ts +3 -2
- package/dist/hub/rooms/direct-view.js +23 -8
- package/dist/hub/rooms/direct-view.js.map +1 -1
- package/dist/hub/rooms/office.d.ts +9 -0
- package/dist/hub/rooms/office.js +10 -2
- package/dist/hub/rooms/office.js.map +1 -1
- package/dist/hub/rooms/service.d.ts +32 -1
- package/dist/hub/rooms/service.js +37 -3
- package/dist/hub/rooms/service.js.map +1 -1
- package/dist/hub/rooms/types.d.ts +5 -2
- package/dist/hub/rooms.d.ts +9 -0
- package/dist/hub/rooms.js +97 -26
- package/dist/hub/rooms.js.map +1 -1
- package/dist/hub/runtime.d.ts +1 -1
- package/dist/hub/server.js +19 -2
- package/dist/hub/server.js.map +1 -1
- package/dist/hub/session-directory-transition.d.ts +1 -0
- package/dist/hub/session-directory-transition.js +15 -9
- package/dist/hub/session-directory-transition.js.map +1 -1
- package/dist/hub/session-limits.d.ts +58 -0
- package/dist/hub/session-limits.js +121 -0
- package/dist/hub/session-limits.js.map +1 -0
- package/dist/hub/sessions.d.ts +1 -1
- package/dist/hub/sessions.js +13 -7
- package/dist/hub/sessions.js.map +1 -1
- package/dist/hub/settings-directory-decision.js +1 -1
- package/dist/hub/settings-directory-decision.js.map +1 -1
- package/dist/hub/types.d.ts +8 -2
- package/dist/hub-picture-reduce.d.ts +14 -0
- package/dist/hub-picture-reduce.js +49 -0
- package/dist/hub-picture-reduce.js.map +1 -0
- package/dist/hub-picture-worker.d.ts +1 -0
- package/dist/hub-picture-worker.js +11 -0
- package/dist/hub-picture-worker.js.map +1 -0
- package/dist/hub-report-target.d.ts +6 -0
- package/dist/hub-report-target.js +6 -0
- package/dist/hub-report-target.js.map +1 -1
- package/dist/locale.js +90 -2
- package/dist/locale.js.map +1 -1
- package/dist/needs-you.d.ts +4 -0
- package/dist/needs-you.js +2 -0
- package/dist/needs-you.js.map +1 -1
- package/dist/outbound-handlers.d.ts +4 -0
- package/dist/outbound-handlers.js +37 -4
- package/dist/outbound-handlers.js.map +1 -1
- package/dist/outbound-schemas.d.ts +2 -0
- package/dist/outbound-schemas.js +6 -4
- package/dist/outbound-schemas.js.map +1 -1
- package/dist/task-board-tool.d.ts +17 -0
- package/dist/task-board-tool.js +58 -6
- package/dist/task-board-tool.js.map +1 -1
- package/dist/tool-permissions.js +2 -2
- package/dist/tool-permissions.js.map +1 -1
- package/dist/ui/contact-tool-groups.js +1 -1
- package/dist/ui/fleet-canvas.js +2 -1
- package/dist/ui/fleet-office-card.js +20 -5
- package/dist/ui/fleet-office-dialogue.d.ts +6 -3
- package/dist/ui/fleet-office-dialogue.js +13 -3
- package/dist/ui/fleet-office-layout.js +13 -13
- package/dist/ui/fleet-office-model.js +3 -2
- package/dist/ui/fleet-office-overview.js +1 -1
- package/dist/ui/fleet-office-pack.d.ts +17 -7
- package/dist/ui/fleet-office-pack.js +106 -38
- package/dist/ui/fleet-office-play.js +11 -4
- package/dist/ui/fleet-office-skin.js +25 -11
- package/dist/ui/fleet-office-store.js +10 -1
- package/dist/ui/fleet-office-talk.js +423 -0
- package/dist/ui/fleet-office-view.js +26 -17
- package/dist/ui/fleet-office-zones.js +20 -12
- package/dist/ui/fleet-office.js +173 -44
- package/dist/ui/fleet-task-common.js +1 -1
- package/dist/ui/fleet-task-sort.js +88 -0
- package/dist/ui/fleet-task-view.js +38 -9
- package/dist/ui/fleet-tasks.js +47 -15
- package/dist/ui/hub-chat-store.js +4 -3
- package/dist/ui/hub-chat-strings.js +2 -0
- package/dist/ui/hub-client.js +3 -0
- package/dist/ui/hub-my-agents-strings.js +2 -2
- package/dist/ui/hub-my-agents.js +3 -0
- package/dist/ui/hub-room-composer.js +24 -4
- package/dist/ui/hub-room-members.js +7 -3
- package/dist/ui/hub-room-office.js +2 -1
- package/dist/ui/hub-room-presence.js +9 -0
- package/dist/ui/hub-room-strings.js +18 -2
- package/dist/ui/hub-room-thread.js +82 -13
- package/dist/ui/hub-room-working.js +37 -0
- package/dist/ui/hub-session-limits.js +79 -0
- package/dist/ui/panel-hub.js +41 -6
- package/dist/ui/panel-needs.js +28 -2
- package/dist/ui/shared/app.css +84 -3
- package/dist/ui/shared/chat-strings.js +1 -1
- package/dist/ui/shared/hub-owner.css +5 -0
- package/dist/ui/shared/hub-rooms-u2.css +3 -0
- package/dist/ui/shared/office-dialogue.css +110 -0
- package/dist/ui/shared/task-board.css +103 -7
- package/dist/web-api.d.ts +5 -0
- package/dist/web-api.js +29 -0
- package/dist/web-api.js.map +1 -1
- package/dist/web-office-skins.d.ts +8 -2
- package/dist/web-office-skins.js +33 -14
- package/dist/web-office-skins.js.map +1 -1
- package/dist/web-office-store.js +5 -3
- package/dist/web-office-store.js.map +1 -1
- package/package.json +1 -1
package/dist/fleet-manager.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { prepareContactChange } from "./contact-change-proposals.js";
|
|
1
2
|
import { detectMonitoringPlatform } from './host-monitoring-defaults.js';
|
|
2
3
|
import { SharedDefaultAdoption } from "./shared-default-adoption.js";
|
|
3
4
|
import { scopedDefaultModel } from "./model-defaults.js";
|
|
@@ -2773,6 +2774,7 @@ export class FleetManager {
|
|
|
2773
2774
|
boundHub: () => this.hubMemberBinding?.(this.dataDir)?.hubId ?? null,
|
|
2774
2775
|
agents: () => this.hubMemberAgents(),
|
|
2775
2776
|
catalogAgents: () => this.hubCatalogAgents(),
|
|
2777
|
+
pictureSources: agent => this.hubPictureSources(agent),
|
|
2776
2778
|
sharingNotice: value => this.recordHubSharingNotice(value),
|
|
2777
2779
|
attachSharing: controller => { this.hubSharingController = controller; },
|
|
2778
2780
|
maxCrossInstanceMessageBytes: () => this.fleetConfig?.defaults?.max_cross_instance_message_bytes,
|
|
@@ -2821,7 +2823,7 @@ export class FleetManager {
|
|
|
2821
2823
|
: this.getInstanceAdapterId(agent) === actor.adapter_id && this.isFleetAdmin(actor.user_id, actor.adapter_id),
|
|
2822
2824
|
}, caller.agent, receiptId),
|
|
2823
2825
|
attachExposures: api => this.attachHubMemberExposures(api),
|
|
2824
|
-
attachAttention: read => this.attachHubExecutionAttention(read),
|
|
2826
|
+
attachAttention: (read, retry) => this.attachHubExecutionAttention(read, retry),
|
|
2825
2827
|
updates: { idle: () => this.hubUpdateIdle(), busy: () => !!this.webUpdateOwned || isUpdateInProgress(this.dataDir),
|
|
2826
2828
|
canInstall: () => this.hubUpdateCanInstall(), launch: (row, control) => this.launchHubUpdate(row, control),
|
|
2827
2829
|
active: id => this.hubUpdateOwned?.id === id, outcome: row => this.hubUpdateOutcome(row), notify: n => this.recordHubUpdateNotice(n) },
|
|
@@ -2930,6 +2932,63 @@ export class FleetManager {
|
|
|
2930
2932
|
: { ...base, shareable: true };
|
|
2931
2933
|
});
|
|
2932
2934
|
}
|
|
2935
|
+
/**
|
|
2936
|
+
* M-3533 R2b: an agent's pictures for the Hub's room offices, as this Fleet shows them (hub-office-visit.md "Decided while
|
|
2937
|
+
* building"). The disc is the sidebar's (webIdentityImage + instance-nav.js avatarOf): a profile picture, else its theme
|
|
2938
|
+
* avatar while the owner shows agents' themes (fx.show), else its bot's avatar, else a Discord custom persona emoji; a
|
|
2939
|
+
* Unicode emoji or an initial is no picture (the catalog's emoji stays). The portrait is the identity card's (a person's,
|
|
2940
|
+
* else the agent's own). Cheap keys only: the bytes are read when a key changes (hub/member/agent-pictures.ts).
|
|
2941
|
+
*/
|
|
2942
|
+
hubPictureSources(name) {
|
|
2943
|
+
let disc = null;
|
|
2944
|
+
let portrait = null;
|
|
2945
|
+
try {
|
|
2946
|
+
const profileFile = profileIdentities(this.dataDir).get(name)?.avatar_path;
|
|
2947
|
+
let profileVersion = null;
|
|
2948
|
+
if (profileFile && imageMimeForFile(profileFile)) {
|
|
2949
|
+
try {
|
|
2950
|
+
profileVersion = Math.floor(statSync(join(this.dataDir, "avatars", basename(profileFile))).mtimeMs).toString(36);
|
|
2951
|
+
}
|
|
2952
|
+
catch { /* removed */ }
|
|
2953
|
+
}
|
|
2954
|
+
let theme = { v: 1 };
|
|
2955
|
+
try {
|
|
2956
|
+
theme = this.themeStore.get(name).theme;
|
|
2957
|
+
}
|
|
2958
|
+
catch { /* unreadable themes: none */ }
|
|
2959
|
+
let themesShown = true;
|
|
2960
|
+
try {
|
|
2961
|
+
themesShown = this.webPrefs.read(OPERATOR).values["fx.show"] !== false;
|
|
2962
|
+
}
|
|
2963
|
+
catch { /* the default: shown */ }
|
|
2964
|
+
// The key names the file and its version (Prism #4393: two agents' uploads may share an mtime).
|
|
2965
|
+
if (profileVersion)
|
|
2966
|
+
disc = { key: `profile:${basename(profileFile)}:${profileVersion}`, load: () => this.webImage("avatar", name) };
|
|
2967
|
+
else if (themesShown && theme.avatar) {
|
|
2968
|
+
const id = theme.avatar;
|
|
2969
|
+
disc = { key: `theme:${id}`, load: () => this.themeStore.asset(name, id) };
|
|
2970
|
+
}
|
|
2971
|
+
else {
|
|
2972
|
+
const bots = this.webBots(), connection = bots.own.get(name) ?? bots.speaking.get(name);
|
|
2973
|
+
const owner = connection ? this.botOwner(connection) : null;
|
|
2974
|
+
const source = connection && owner?.adapter.fetchBotAvatar ? this.botAvatarSource(connection, owner) : null;
|
|
2975
|
+
const bot = source ? this.webImageCache("avatars").peek(source.key, source.load) : null;
|
|
2976
|
+
if (source && bot)
|
|
2977
|
+
disc = { key: `${source.key}:${bot.version}`, load: () => this.webImageCache("avatars").read(source.key) };
|
|
2978
|
+
else {
|
|
2979
|
+
const emoji = normalizeEmoji(this.ownInstanceConfig(name)?.status_emojis?.delivered);
|
|
2980
|
+
const cached = emoji?.kind === "custom" ? this.webImageCache("emoji").read(`emoji:${emoji.id}`) : null;
|
|
2981
|
+
if (emoji?.kind === "custom" && cached)
|
|
2982
|
+
disc = { key: `emoji:${emoji.id}:${cached.version}`, load: () => this.webImageCache("emoji").read(`emoji:${emoji.id}`) };
|
|
2983
|
+
}
|
|
2984
|
+
}
|
|
2985
|
+
const person = humanCards(this.dataDir).get(name)?.portrait ?? null, own = theme.card?.portrait ?? null;
|
|
2986
|
+
if (person || own)
|
|
2987
|
+
portrait = { key: person ? `card:${person}` : `agent-card:${own}`, load: () => cardPicture({ dataDir: this.dataDir, themeStore: this.themeStore }, name, "portrait") };
|
|
2988
|
+
}
|
|
2989
|
+
catch { /* unreadable: no pictures */ }
|
|
2990
|
+
return { disc, portrait };
|
|
2991
|
+
}
|
|
2933
2992
|
/** The actual launch target, including Classic's own effective backend/folder; never aliases a room to a Fleet topic. */
|
|
2934
2993
|
hubAgentConfig(agent) {
|
|
2935
2994
|
const instances = this.fleetConfig?.instances ?? {};
|
|
@@ -3682,6 +3741,8 @@ export class FleetManager {
|
|
|
3682
3741
|
/** #3292: "Keep sign-in alive" (signin-keepalive.ts); built at startup, stopped at shutdown. */
|
|
3683
3742
|
signInKeepAlive = null;
|
|
3684
3743
|
hubExecutionAttention = null;
|
|
3744
|
+
/** M-3632: the member's "Try again" for a held Hub question (null while no member runs). */
|
|
3745
|
+
hubHeldRetry = null;
|
|
3685
3746
|
missedOfflineStore = null;
|
|
3686
3747
|
configHistory = null;
|
|
3687
3748
|
configHistoryTimer = null;
|
|
@@ -6278,6 +6339,93 @@ export class FleetManager {
|
|
|
6278
6339
|
originRevision: service.host.store.originRevision(name) });
|
|
6279
6340
|
return this.contactPermissions(name, actor);
|
|
6280
6341
|
}
|
|
6342
|
+
/** General can propose only. The platform callback supplies the human actor. */
|
|
6343
|
+
async requestContactChange(requester, raw, callerCurrent) {
|
|
6344
|
+
if (!callerCurrent() || this.fleetConfig?.instances[requester]?.general_topic !== true)
|
|
6345
|
+
throw Error("general-only");
|
|
6346
|
+
if (this.hubContactRestricted(requester))
|
|
6347
|
+
throw Error("hub-contact-restricted");
|
|
6348
|
+
const pending = [...this.pendingNonceButtons.values()].filter(e => e.prefix === "contact-change:");
|
|
6349
|
+
if (pending.length >= 64 || pending.filter(e => e.generalName === requester).length >= 8)
|
|
6350
|
+
throw Error("contact-proposal-limit");
|
|
6351
|
+
const service = this.contactService();
|
|
6352
|
+
const plan = prepareContactChange(raw, { service, label: n => this.fleetConfig?.instances[n]?.display_name || this.contactRoom(n)?.displayName || n, timeZone: () => this.usageZone(), mode: n => { const room = this.contactRoom(n); return room ? room.restrictedMode ? "restricted" : "legacy" : undefined; },
|
|
6353
|
+
generation: n => this.contactGeneration(n), modeAdmin: (n, p) => this.contactAdminOf(n, p),
|
|
6354
|
+
write: (n, value, p) => this.writeContactPermissions(n, value, p), decide: (id, value, p) => this.decideContactAuthorization(id, value, p) });
|
|
6355
|
+
const targetAdapter = this.contactAdapter(plan.target);
|
|
6356
|
+
if (!targetAdapter || !["discord", "telegram"].includes(targetAdapter.type))
|
|
6357
|
+
throw Error("contact-proposal-use-web");
|
|
6358
|
+
const routes = Object.keys(this.fleetConfig?.instances ?? {}).flatMap(n => {
|
|
6359
|
+
const route = this.settingsGeneralRoute(n, targetAdapter.type, new Set());
|
|
6360
|
+
return route && route.adapterId === targetAdapter.id && route.adapter === targetAdapter ? [{ name: n, ...route }] : [];
|
|
6361
|
+
});
|
|
6362
|
+
if (routes.length !== 1)
|
|
6363
|
+
throw Error("contact-proposal-route-unavailable");
|
|
6364
|
+
const route = routes[0], requesterPin = this.lifecyclePin(requester), deadline = performance.now() + 5 * 60_000;
|
|
6365
|
+
let retired = false;
|
|
6366
|
+
const current = () => !retired && !this.shuttingDown && performance.now() < deadline && callerCurrent() && requesterPin()
|
|
6367
|
+
&& this.fleetConfig?.instances[requester]?.general_topic === true && !this.hubContactRestricted(requester)
|
|
6368
|
+
&& route.current() && this.contactAdapter(plan.target) === targetAdapter && this.adapters.get(targetAdapter.id) === targetAdapter && plan.current();
|
|
6369
|
+
if (!current())
|
|
6370
|
+
throw Error("conflict");
|
|
6371
|
+
const posted = this.postNonceButtonPromptOrThrow({ prefix: "contact-change:", alertType: "clear_confirm", instanceName: route.name,
|
|
6372
|
+
adapter: route.adapter, adapterId: route.adapterId, chatId: route.chatId, threadId: route.topic,
|
|
6373
|
+
message: [t("contactProposal.title"), ...plan.summary].join("\n"),
|
|
6374
|
+
choices: [{ action: "confirm", label: t("contactProposal.confirm") }, { action: "cancel", label: t("contactProposal.cancel") }],
|
|
6375
|
+
expiredText: t("contactProposal.expired"), timeoutMs: 5 * 60_000,
|
|
6376
|
+
extra: { generalName: requester, contactChange: { plan, current } } });
|
|
6377
|
+
const retire = (nonce) => {
|
|
6378
|
+
const entry = this.pendingNonceButtons.get(nonce);
|
|
6379
|
+
if (!entry)
|
|
6380
|
+
return;
|
|
6381
|
+
this.pendingNonceButtons.delete(nonce);
|
|
6382
|
+
if (entry.timer)
|
|
6383
|
+
clearTimeout(entry.timer);
|
|
6384
|
+
void this.retireNonceButtons(entry, entry.messageId ?? "", t("contactProposal.expired"));
|
|
6385
|
+
};
|
|
6386
|
+
void posted.then(nonce => { if (retired || !current())
|
|
6387
|
+
retire(nonce); }, () => { });
|
|
6388
|
+
try {
|
|
6389
|
+
const nonce = await withinBudget(posted, performance.now() + 5000);
|
|
6390
|
+
if (!current()) {
|
|
6391
|
+
retire(nonce);
|
|
6392
|
+
throw Error("conflict");
|
|
6393
|
+
}
|
|
6394
|
+
return { status: "awaiting_platform_admin_confirmation" };
|
|
6395
|
+
}
|
|
6396
|
+
catch (error) {
|
|
6397
|
+
retired = true;
|
|
6398
|
+
throw error;
|
|
6399
|
+
}
|
|
6400
|
+
}
|
|
6401
|
+
async handleContactChangeCallback(data, adapterId, adapter) {
|
|
6402
|
+
if (!data.callbackData.startsWith("contact-change:"))
|
|
6403
|
+
return false;
|
|
6404
|
+
const person = data.userId && adapter && this.adapters.get(adapterId) === adapter && adapter.id === adapterId
|
|
6405
|
+
&& (adapter.type === "discord" || adapter.type === "telegram") && data.userId !== adapter.getBotUserId?.()
|
|
6406
|
+
? { platform: adapter.type, adapterId, userId: data.userId, label: data.username || data.userId } : null;
|
|
6407
|
+
const claimed = this.consumeNonceCallback("contact-change:", /^contact-change:([0-9a-f]{32}):(confirm|cancel)$/, data, adapterId, adapter, undefined, (_user, entry) => !!person && !!entry.messageId && !this.webPromptClicks.has(data) && entry.contactChange?.plan.authorized(person) === true);
|
|
6408
|
+
if (claimed === null)
|
|
6409
|
+
return false;
|
|
6410
|
+
if (claimed === "consumed")
|
|
6411
|
+
return true;
|
|
6412
|
+
const { entry, action } = claimed;
|
|
6413
|
+
const stillCurrent = entry.lifecycleCurrent?.() === true && entry.contactChange?.current() === true;
|
|
6414
|
+
let text = t(stillCurrent ? "contactProposal.cancelled" : "contactProposal.expired");
|
|
6415
|
+
if (action === "confirm" && stillCurrent) {
|
|
6416
|
+
try {
|
|
6417
|
+
if (!person)
|
|
6418
|
+
throw Error("forbidden");
|
|
6419
|
+
entry.contactChange.plan.apply(person);
|
|
6420
|
+
text = entry.contactChange.plan.success;
|
|
6421
|
+
}
|
|
6422
|
+
catch {
|
|
6423
|
+
text = t("contactProposal.failed");
|
|
6424
|
+
}
|
|
6425
|
+
}
|
|
6426
|
+
await this.retireNonceButtons(entry, entry.messageId ?? data.messageId, text);
|
|
6427
|
+
return true;
|
|
6428
|
+
}
|
|
6281
6429
|
contactAuthorization(id, actor) {
|
|
6282
6430
|
const service = this.contactService(), ticket = service.host.store.get(id);
|
|
6283
6431
|
if (!ticket)
|
|
@@ -11261,7 +11409,7 @@ export class FleetManager {
|
|
|
11261
11409
|
result = { carried: false, reason: `copy failed: ${err.message}` };
|
|
11262
11410
|
}
|
|
11263
11411
|
if (result.carried) {
|
|
11264
|
-
const fields = { name, from: sw.from ?? "default", to: sw.to ?? "default", bytes: result.bytes, ms: result.ms, replacedOlderCopy: result.replacedOlderCopy };
|
|
11412
|
+
const fields = { name, from: sw.from ?? "default", to: sw.to ?? "default", bytes: result.bytes, ms: result.ms, replacedOlderCopy: result.replacedOlderCopy, ...(result.backedUp ? { backedUp: result.backedUp } : {}) };
|
|
11265
11413
|
if (result.bytes > CARRY_LARGE_BYTES)
|
|
11266
11414
|
this.logger.warn(fields, "Conversation carried to the new credential profile (a large transcript)");
|
|
11267
11415
|
else
|
|
@@ -20644,6 +20792,8 @@ export class FleetManager {
|
|
|
20644
20792
|
return true;
|
|
20645
20793
|
if (await this.handleLoginBackendSelect(data, adapterId, adapter))
|
|
20646
20794
|
return true;
|
|
20795
|
+
if (await this.handleContactChangeCallback(data, adapterId, adapter))
|
|
20796
|
+
return true;
|
|
20647
20797
|
if (await this.handleSettingsChangeCallback(data, adapterId, adapter))
|
|
20648
20798
|
return true;
|
|
20649
20799
|
if (await this.handleKiroMigrateCallback(data, adapterId, adapter))
|
|
@@ -20720,9 +20870,22 @@ export class FleetManager {
|
|
|
20720
20870
|
return this.needsYou?.webItems() ?? [];
|
|
20721
20871
|
}
|
|
20722
20872
|
/** Enabled member composition supplies only a local attention reader, never an approval/execution callback. */
|
|
20723
|
-
attachHubExecutionAttention(read) {
|
|
20873
|
+
attachHubExecutionAttention(read, retry = null) {
|
|
20724
20874
|
this.hubExecutionAttention = read;
|
|
20875
|
+
this.hubHeldRetry = read ? retry : null;
|
|
20876
|
+
this.needsYou?.poke();
|
|
20877
|
+
}
|
|
20878
|
+
/**
|
|
20879
|
+
* M-3632: Needs you → "Try again" on held Hub work (`hub:hold:<row>`). The question goes back through the member's whole
|
|
20880
|
+
* hand-off, including the Hub's begin lease; nothing is delivered without it.
|
|
20881
|
+
*/
|
|
20882
|
+
retryHubHeld(itemId) {
|
|
20883
|
+
const id = itemId.startsWith("hub:") ? itemId.slice(4) : itemId;
|
|
20884
|
+
if (!this.hubHeldRetry || !id.startsWith("hold:"))
|
|
20885
|
+
return { status: 404, code: "not-found" };
|
|
20886
|
+
const code = this.hubHeldRetry(id);
|
|
20725
20887
|
this.needsYou?.poke();
|
|
20888
|
+
return { status: code === "queued" ? 200 : code === "not-found" ? 404 : 409, code };
|
|
20726
20889
|
}
|
|
20727
20890
|
/**
|
|
20728
20891
|
* #1389: the org chart's structure for the web — the instances the dashboard lists (getUiStatus's names), General,
|