@songsid/agend 2.4.0-beta.30 → 2.4.0-beta.32
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/backend/antigravity.js +39 -0
- package/dist/backend/antigravity.js.map +1 -1
- package/dist/build-provenance.json +1 -1
- package/dist/channel/mcp-tools.js +1 -1
- package/dist/channel/mcp-tools.js.map +1 -1
- package/dist/daemon.d.ts +11 -1
- package/dist/daemon.js +121 -26
- package/dist/daemon.js.map +1 -1
- package/dist/fleet-context.d.ts +2 -0
- package/dist/fleet-manager.d.ts +9 -0
- package/dist/fleet-manager.js +84 -9
- package/dist/fleet-manager.js.map +1 -1
- package/dist/general-knowledge/skills/concepts/SKILL.md +21 -2
- package/dist/general-knowledge/skills/credential-profiles/SKILL.md +9 -4
- package/dist/general-knowledge/skills/hub/SKILL.md +6 -0
- package/dist/general-knowledge/skills/web-dashboard/SKILL.md +2 -0
- package/dist/hub/admission.d.ts +2 -0
- package/dist/hub/admission.js +13 -0
- package/dist/hub/admission.js.map +1 -1
- package/dist/hub/client.d.ts +10 -0
- package/dist/hub/client.js +126 -4
- package/dist/hub/client.js.map +1 -1
- package/dist/hub/compose/member.d.ts +13 -1
- package/dist/hub/compose/member.js +34 -5
- package/dist/hub/compose/member.js.map +1 -1
- package/dist/hub/identity.d.ts +2 -0
- package/dist/hub/identity.js +5 -2
- package/dist/hub/identity.js.map +1 -1
- package/dist/hub/member/room-ask.d.ts +1 -0
- package/dist/hub/member/room-ask.js +11 -4
- package/dist/hub/member/room-ask.js.map +1 -1
- package/dist/hub/member-journal.d.ts +8 -0
- package/dist/hub/member-journal.js +41 -0
- package/dist/hub/member-journal.js.map +1 -1
- package/dist/hub/policy.d.ts +3 -1
- package/dist/hub/policy.js +3 -1
- package/dist/hub/policy.js.map +1 -1
- package/dist/hub/protocol.d.ts +7 -0
- package/dist/hub/protocol.js +8 -1
- package/dist/hub/protocol.js.map +1 -1
- package/dist/hub/representative.d.ts +6 -0
- package/dist/hub/representative.js +39 -5
- package/dist/hub/representative.js.map +1 -1
- package/dist/hub/server.js +6 -2
- package/dist/hub/server.js.map +1 -1
- package/dist/hub-reply-route.d.ts +36 -0
- package/dist/hub-reply-route.js +67 -0
- package/dist/hub-reply-route.js.map +1 -0
- package/dist/hub-report-target.d.ts +4 -0
- package/dist/locale.js +2 -2
- package/dist/locale.js.map +1 -1
- package/dist/outbound-handlers.d.ts +2 -0
- package/dist/outbound-handlers.js +22 -7
- package/dist/outbound-handlers.js.map +1 -1
- package/dist/outbound-schemas.d.ts +1 -0
- package/dist/outbound-schemas.js +1 -0
- package/dist/outbound-schemas.js.map +1 -1
- package/dist/topic-commands.js +6 -4
- package/dist/topic-commands.js.map +1 -1
- package/dist/turn-reply-guard.d.ts +3 -1
- package/dist/turn-reply-guard.js +3 -2
- package/dist/turn-reply-guard.js.map +1 -1
- package/dist/ui/hub-chat-store.js +9 -6
- package/dist/ui/hub-chat-strings.js +4 -2
- package/dist/ui/hub-room-strings.js +2 -2
- package/dist/ui/hub-room-thread.js +9 -3
- package/dist/ui/panel-chat.js +18 -5
- package/dist/ui/panel-hub.js +2 -2
- package/dist/ui/report-columns.js +137 -0
- package/dist/ui/shared/app.css +28 -2
- package/package.json +1 -1
package/dist/fleet-context.d.ts
CHANGED
|
@@ -215,6 +215,8 @@ export interface FleetContext {
|
|
|
215
215
|
cancelLoginSession?(): Promise<string>;
|
|
216
216
|
/** Human-readable effective model for an instance (resolves inherited defaults). */
|
|
217
217
|
modelDisplayForInstance?(name: string): string;
|
|
218
|
+
/** M-3943: the account an agent signs in with — a profile name, "default", "invalid", or null when its backend has none. */
|
|
219
|
+
credentialProfileLabel?(name: string, backend?: string): string | null;
|
|
218
220
|
/** How this instance's backend takes a reasoning-effort setting, if at all. */
|
|
219
221
|
effortStrategyFor?(name: string): "runtime" | "restart" | "unsupported";
|
|
220
222
|
/** Configured effort for an instance: per-instance, else fleet default, else none. */
|
package/dist/fleet-manager.d.ts
CHANGED
|
@@ -1037,6 +1037,9 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1037
1037
|
/** M-3660: a settled question lifts its window only outside its own running answer turn; inside it, the turn's end does. */
|
|
1038
1038
|
private hubSettledOutsideTurn;
|
|
1039
1039
|
/** M-3660: the member side's "this question is no longer being answered" reader (null: no member service attached). */
|
|
1040
|
+
private notifyHubQuestionEnded;
|
|
1041
|
+
private hubQuestionDelivered;
|
|
1042
|
+
private hubQuestionEnded;
|
|
1040
1043
|
private hubQuestionSettled;
|
|
1041
1044
|
hubContactRestricted(agent: string): boolean;
|
|
1042
1045
|
hubContactQuestion(agent: string): string | null;
|
|
@@ -4931,6 +4934,12 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
4931
4934
|
/** #3715: update_instance_config's ClassicBot room account switch — the room's Settings save (#3691), from a tool. */
|
|
4932
4935
|
switchClassicRoomProfile(name: string, backendOptions: unknown): Promise<ClassicProfileSwitch>;
|
|
4933
4936
|
credentialProfileOf(name: string, backend: string): string | null;
|
|
4937
|
+
/**
|
|
4938
|
+
* M-3943: the account an agent signs in with, as /status, the web status table and list_instances show it — a profile
|
|
4939
|
+
* name, "default" for the backend's shared login, "invalid" for a ClassicBot room whose setting cannot launch, or
|
|
4940
|
+
* null when the backend has no profiles. A Windows agent's profile is the one kept on its paired Runtime computer.
|
|
4941
|
+
*/
|
|
4942
|
+
credentialProfileLabel(name: string, backend?: string): string | null;
|
|
4934
4943
|
/**
|
|
4935
4944
|
* #1699: the claude config dir an instance's CLI uses — its credential profile's, else exactly as before
|
|
4936
4945
|
* (CLAUDE_CONFIG_DIR or ~/.claude).
|
package/dist/fleet-manager.js
CHANGED
|
@@ -288,7 +288,7 @@ import { windowsCliEnabled, closeWindowsBridge, retireWindowsBridgeForRequestCon
|
|
|
288
288
|
import { nativeCliVersionState } from "./runtime-pane-native.js";
|
|
289
289
|
import { localWindowsCliEnabled, remoteRuntimeEnabled, setConfiguredRuntimeSwitches, maxAgentsPerMachine } from "./runtime-switches.js";
|
|
290
290
|
import { RuntimeInstallService } from "./runtime-install.js";
|
|
291
|
-
import { RUNTIME_CREDENTIAL_CAPABILITY, validCredentialProfileName } from "./runtime-credential-profiles.js";
|
|
291
|
+
import { RUNTIME_CREDENTIAL_CAPABILITY, isCredentialProfileCli, validCredentialProfileName } from "./runtime-credential-profiles.js";
|
|
292
292
|
import { RuntimeCoordinator } from "./runtime-coordinator.js";
|
|
293
293
|
import { runtimeUpdateAttention } from "./runtime-update-attention.js";
|
|
294
294
|
import { RuntimeWindowsBridge } from "./runtime-windows-bridge.js";
|
|
@@ -4199,6 +4199,8 @@ export class FleetManager {
|
|
|
4199
4199
|
scratchDir: agent => isSafeInstanceDirName(agent) ? join(this.dataDir, "workspaces", agent, "hub-files") : null },
|
|
4200
4200
|
attachReports: (handler, failed) => { this.hubReports = handler; this.hubDeliveryFailed = failed; },
|
|
4201
4201
|
attachPrivateQuestions: read => { this.hubPrivateQuestions = read; },
|
|
4202
|
+
attachQuestionEnded: ended => { this.hubQuestionEnded = ended; },
|
|
4203
|
+
attachQuestionDelivered: delivered => { this.hubQuestionDelivered = delivered; },
|
|
4202
4204
|
attachQuestionSettled: read => { this.hubQuestionSettled = read; },
|
|
4203
4205
|
attachReacts: handler => { this.hubReacts = handler; },
|
|
4204
4206
|
},
|
|
@@ -4741,6 +4743,7 @@ export class FleetManager {
|
|
|
4741
4743
|
hubQuestionTurnEnded(agent, correlationId) {
|
|
4742
4744
|
if (this.hubAnswerTurns.get(agent) === correlationId)
|
|
4743
4745
|
this.hubAnswerTurns.set(agent, null);
|
|
4746
|
+
this.notifyHubQuestionEnded(agent, correlationId);
|
|
4744
4747
|
try {
|
|
4745
4748
|
this.contactWindows().answered(agent, correlationId);
|
|
4746
4749
|
}
|
|
@@ -4762,8 +4765,10 @@ export class FleetManager {
|
|
|
4762
4765
|
}
|
|
4763
4766
|
if (correlationId)
|
|
4764
4767
|
this.hubQuestionInput(agent, correlationId, contactLimit);
|
|
4765
|
-
else
|
|
4768
|
+
else {
|
|
4766
4769
|
this.hubAnswerTurns.set(agent, null);
|
|
4770
|
+
this.notifyHubQuestionEnded(agent, null);
|
|
4771
|
+
}
|
|
4767
4772
|
}
|
|
4768
4773
|
/** M-3660: a daemon's Hub turn signal (from its current connection). "unknown" (an unreadable turn record) changes nothing. */
|
|
4769
4774
|
hubTurnSignal(agent, msg) {
|
|
@@ -4772,6 +4777,8 @@ export class FleetManager {
|
|
|
4772
4777
|
if (msg.unknown !== true && (cid || msg.correlationId === null))
|
|
4773
4778
|
this.hubQuestionTurnState(agent, cid, msg.contactLimit !== false);
|
|
4774
4779
|
}
|
|
4780
|
+
else if (cid && msg.type === "hub_question_delivered")
|
|
4781
|
+
this.hubQuestionDelivered?.(agent, cid);
|
|
4775
4782
|
else if (cid && msg.type === "hub_question_input")
|
|
4776
4783
|
this.hubQuestionInput(agent, cid, msg.contactLimit !== false);
|
|
4777
4784
|
else if (cid && msg.type === "hub_question_turn_ended")
|
|
@@ -4787,6 +4794,16 @@ export class FleetManager {
|
|
|
4787
4794
|
return settled ? (agent, correlationId) => this.hubAnswerTurnKnownNone(agent, correlationId) && settled(agent, correlationId) : undefined;
|
|
4788
4795
|
}
|
|
4789
4796
|
/** M-3660: the member side's "this question is no longer being answered" reader (null: no member service attached). */
|
|
4797
|
+
notifyHubQuestionEnded(agent, correlationId) {
|
|
4798
|
+
try {
|
|
4799
|
+
this.hubQuestionEnded?.(agent, correlationId);
|
|
4800
|
+
}
|
|
4801
|
+
catch (err) {
|
|
4802
|
+
this.logger?.warn({ err }, "Hub unanswered completion receipt held");
|
|
4803
|
+
}
|
|
4804
|
+
}
|
|
4805
|
+
hubQuestionDelivered = null;
|
|
4806
|
+
hubQuestionEnded = null;
|
|
4790
4807
|
hubQuestionSettled = null;
|
|
4791
4808
|
hubContactRestricted(agent) { return this.contactWindows().restricted(agent, this.hubSettledOutsideTurn()); }
|
|
4792
4809
|
hubContactQuestion(agent) { return this.contactWindows().restrictingQuestion(agent, this.hubSettledOutsideTurn()); }
|
|
@@ -4862,7 +4879,10 @@ export class FleetManager {
|
|
|
4862
4879
|
// M-3660: the share's opt-out travels with the question; its daemon's hub_question_input then opens no window.
|
|
4863
4880
|
if (input.contactLimit === false)
|
|
4864
4881
|
ipcMeta.hub_contact_limit = "off";
|
|
4865
|
-
const
|
|
4882
|
+
const replyInputId = input.acceptedHubRequest ? randomUUID() : undefined;
|
|
4883
|
+
let registeredDaemon;
|
|
4884
|
+
const screenedText = this.screenHubText(input.text);
|
|
4885
|
+
const result = await this.deliverToInstance(input.agent, { ...(replyInputId ? { hub_reply_input_id: replyInputId } : {}), type: "fleet_inbound", targetSession: input.agent, content: screenedText, meta: ipcMeta, ...(scoped ? { request_context_input_id: scoped.inputId } : {}) }, { isCrossInstance: true, stillCurrent: input.stillCurrent, beforeInput: async () => {
|
|
4866
4886
|
const classic = this.isClassicInstance(input.agent);
|
|
4867
4887
|
// A busy Classic room must finish its public turn first; never force a private question into that turn's queue.
|
|
4868
4888
|
const idle = () => this.waitForInstanceIdle(input.agent, 0, this.lastDeliveryAt.get(input.agent) ?? 0, () => !input.stillCurrent());
|
|
@@ -4885,8 +4905,20 @@ export class FleetManager {
|
|
|
4885
4905
|
// M-3660: the window covers only the turn that answers the question. The agent's daemon (Classic rooms' too)
|
|
4886
4906
|
// writes it only into an idle pane, as a turn of its own, and says so just before the write (hub_question_input),
|
|
4887
4907
|
// so a question waiting behind another turn — or never written — opens nothing.
|
|
4908
|
+
if (!input.stillCurrent())
|
|
4909
|
+
return false;
|
|
4910
|
+
if (replyInputId && input.acceptedHubRequest) {
|
|
4911
|
+
const daemon = this.daemons.get(input.agent);
|
|
4912
|
+
if (typeof daemon?.registerHubReplyInput !== "function")
|
|
4913
|
+
return false;
|
|
4914
|
+
registeredDaemon = daemon;
|
|
4915
|
+
daemon.registerHubReplyInput(replyInputId, input.acceptedHubRequest, input.correlationId, screenedText, this.screenHubText(input.replyQuestionBeginning ?? ""));
|
|
4916
|
+
}
|
|
4888
4917
|
return input.stillCurrent();
|
|
4889
|
-
} })
|
|
4918
|
+
} }).catch(error => { if (replyInputId)
|
|
4919
|
+
registeredDaemon?.releaseHubReplyInput(replyInputId); throw error; });
|
|
4920
|
+
if (result === false && replyInputId)
|
|
4921
|
+
registeredDaemon?.releaseHubReplyInput(replyInputId);
|
|
4890
4922
|
return result !== false;
|
|
4891
4923
|
}
|
|
4892
4924
|
async deliverHubRoomNotification(input) {
|
|
@@ -5011,7 +5043,12 @@ export class FleetManager {
|
|
|
5011
5043
|
const result = this.hubReports?.(input) ?? null;
|
|
5012
5044
|
if (!result)
|
|
5013
5045
|
return null;
|
|
5046
|
+
const daemon = this.daemons.get(input.caller);
|
|
5047
|
+
const callerCurrent = () => typeof input.callerCurrent === "function" && input.callerCurrent();
|
|
5048
|
+
const settle = callerCurrent() ? daemon?.captureHubReplyCompletion?.(input.correlationId) : null;
|
|
5014
5049
|
return result.then(outcome => {
|
|
5050
|
+
if (this.daemons.get(input.caller) === daemon && callerCurrent())
|
|
5051
|
+
settle?.(outcome);
|
|
5015
5052
|
// M-3660: an accepted answer inside its own running answer turn does not lift it: the turn's end does.
|
|
5016
5053
|
if (outcome.ok && this.hubAnswerTurnKnownNone(input.caller, input.correlationId)) {
|
|
5017
5054
|
try {
|
|
@@ -5022,11 +5059,18 @@ export class FleetManager {
|
|
|
5022
5059
|
}
|
|
5023
5060
|
}
|
|
5024
5061
|
return outcome;
|
|
5025
|
-
})
|
|
5062
|
+
}, error => { if (this.daemons.get(input.caller) === daemon)
|
|
5063
|
+
settle?.({ ok: false, message: "Hub outcome unconfirmed" }); throw error; });
|
|
5026
5064
|
}
|
|
5027
5065
|
/** M-3127 OutboundContext: an agent's `react` on a Hub room question (its correlation id as message_id); null: not one. */
|
|
5028
5066
|
hubReact(input) {
|
|
5029
|
-
|
|
5067
|
+
const result = this.hubReacts?.(input) ?? null;
|
|
5068
|
+
if (!result)
|
|
5069
|
+
return null;
|
|
5070
|
+
const daemon = this.daemons.get(input.caller), callerCurrent = () => typeof input.callerCurrent === "function" && input.callerCurrent(), settle = callerCurrent() ? daemon?.captureHubReplyCompletion?.(input.correlationId, false) : null;
|
|
5071
|
+
return result.then(outcome => { if (this.daemons.get(input.caller) === daemon && callerCurrent())
|
|
5072
|
+
settle?.(outcome); return outcome; }, error => { if (this.daemons.get(input.caller) === daemon)
|
|
5073
|
+
settle?.({ ok: false, message: "Hub acknowledgement unconfirmed" }); throw error; });
|
|
5030
5074
|
}
|
|
5031
5075
|
hubReacts = null;
|
|
5032
5076
|
/** The member side's pane-failure hook for a Hub-issued correlation id (else null). */
|
|
@@ -11674,6 +11718,7 @@ export class FleetManager {
|
|
|
11674
11718
|
return;
|
|
11675
11719
|
this.cancelIdleButtonRetirement(name);
|
|
11676
11720
|
this.instanceProcessStatus.set(name, status);
|
|
11721
|
+
this.notifyHubQuestionEnded(name, null);
|
|
11677
11722
|
// Never display the last ready prompt as current execution state after its
|
|
11678
11723
|
// owning CLI process has exited.
|
|
11679
11724
|
if (this.instanceStateCache.delete(name))
|
|
@@ -12769,7 +12814,7 @@ export class FleetManager {
|
|
|
12769
12814
|
const after = identity();
|
|
12770
12815
|
if (!owned() || after.incarnation !== before.incarnation || after.workGeneration === before.workGeneration)
|
|
12771
12816
|
throw Error("Fresh request work identity did not rotate");
|
|
12772
|
-
}, snapshot => requestHumanReplyTarget(box, snapshot, () => owned() && daemon.requestContextTurnCurrent(snapshot), root => this.requestContextNativeAdmissionCurrent(root)), (id, recovery) => {
|
|
12817
|
+
}, snapshot => requestHumanReplyTarget(box, snapshot, () => owned() && daemon.requestContextTurnCurrent(snapshot), root => this.requestContextNativeAdmissionCurrent(root)) ?? (owned() && daemon.requestContextTurnCurrent(snapshot) ? daemon.hubReplyTarget?.(snapshot) ?? null : null), (id, recovery) => {
|
|
12773
12818
|
const publication = this.requestContextBoot?.publication;
|
|
12774
12819
|
if (!publication)
|
|
12775
12820
|
return;
|
|
@@ -18535,7 +18580,8 @@ export class FleetManager {
|
|
|
18535
18580
|
this.refuseTypedIpc(name, msg, typed.message);
|
|
18536
18581
|
}
|
|
18537
18582
|
else if (msg.type === "instance_process_state") {
|
|
18538
|
-
this.
|
|
18583
|
+
if (this.instanceIpcClients.get(name) === ipc)
|
|
18584
|
+
this.cacheInstanceProcessStatus(name, msg.status);
|
|
18539
18585
|
}
|
|
18540
18586
|
else if (msg.type === "instance_activity") {
|
|
18541
18587
|
this.cacheInstanceActivity(name, msg.activity);
|
|
@@ -18547,7 +18593,7 @@ export class FleetManager {
|
|
|
18547
18593
|
if (this.instanceIpcClients.get(name) === ipc && typeof msg.generation === "string" && typeof msg.turn === "string")
|
|
18548
18594
|
void this.hubRoomOwed?.turnEnded(name, msg.generation, msg.turn).catch(err => this.logger.warn({ err }, "Hub room completion notice held"));
|
|
18549
18595
|
}
|
|
18550
|
-
else if (msg.type === "hub_question_input" || msg.type === "hub_question_turn_ended" || msg.type === "hub_question_turn_state") {
|
|
18596
|
+
else if (msg.type === "hub_question_input" || msg.type === "hub_question_turn_ended" || msg.type === "hub_question_turn_state" || msg.type === "hub_question_delivered") {
|
|
18551
18597
|
// M-3660: only the instance's current daemon speaks for its pane's turns.
|
|
18552
18598
|
if (this.instanceIpcClients.get(name) === ipc)
|
|
18553
18599
|
this.hubTurnSignal(name, msg);
|
|
@@ -24841,6 +24887,34 @@ export class FleetManager {
|
|
|
24841
24887
|
return null;
|
|
24842
24888
|
return profileName(this.classicChannels.getCredentialProfileByInstance(name, this.fleetConfig?.defaults));
|
|
24843
24889
|
}
|
|
24890
|
+
/**
|
|
24891
|
+
* M-3943: the account an agent signs in with, as /status, the web status table and list_instances show it — a profile
|
|
24892
|
+
* name, "default" for the backend's shared login, "invalid" for a ClassicBot room whose setting cannot launch, or
|
|
24893
|
+
* null when the backend has no profiles. A Windows agent's profile is the one kept on its paired Runtime computer.
|
|
24894
|
+
*/
|
|
24895
|
+
credentialProfileLabel(name, backend = this.backendNameOf(name)) {
|
|
24896
|
+
const cfg = this.fleetConfig?.instances?.[name];
|
|
24897
|
+
if (isWindowsInstance(cfg)) {
|
|
24898
|
+
if (!isCredentialProfileCli(cfg?.backend ?? backend))
|
|
24899
|
+
return null;
|
|
24900
|
+
try {
|
|
24901
|
+
return nativeCredentialProfile(cfg) ?? "default";
|
|
24902
|
+
}
|
|
24903
|
+
catch {
|
|
24904
|
+
return "invalid";
|
|
24905
|
+
}
|
|
24906
|
+
}
|
|
24907
|
+
if (!credentialHomeSpec(backend))
|
|
24908
|
+
return null;
|
|
24909
|
+
const profile = this.credentialProfileOf(name, backend);
|
|
24910
|
+
if (profile)
|
|
24911
|
+
return profile;
|
|
24912
|
+
if (!cfg && !this.daemons.get(name)?.getConfigSnapshot?.()
|
|
24913
|
+
&& this.classicChannels?.getBackendByInstance(name, this.fleetConfig?.defaults?.backend) === backend
|
|
24914
|
+
&& this.classicChannels.getCredentialProfileByInstance(name, this.fleetConfig?.defaults).state === "invalid")
|
|
24915
|
+
return "invalid";
|
|
24916
|
+
return "default";
|
|
24917
|
+
}
|
|
24844
24918
|
/**
|
|
24845
24919
|
* #1699: the claude config dir an instance's CLI uses — its credential profile's, else exactly as before
|
|
24846
24920
|
* (CLAUDE_CONFIG_DIR or ~/.claude).
|
|
@@ -28095,6 +28169,7 @@ export class FleetManager {
|
|
|
28095
28169
|
if (!daemon)
|
|
28096
28170
|
return false;
|
|
28097
28171
|
const deliveryEpoch = this.cancelPendingDeliveries(instanceName);
|
|
28172
|
+
this.notifyHubQuestionEnded(instanceName, null);
|
|
28098
28173
|
daemon.clearPendingDeliveries?.(deliveryEpoch);
|
|
28099
28174
|
daemon.sendEscape().catch(e => this.logger.warn({ err: e, instanceName }, "sendEscape failed"));
|
|
28100
28175
|
this.lastInboundMsg.delete(instanceName);
|