@songsid/agend 2.4.0-beta.6 → 2.4.0-beta.7
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 +2 -0
- package/dist/app-message-origin.d.ts +2 -0
- package/dist/app-message-origin.js +3 -0
- package/dist/app-message-origin.js.map +1 -0
- package/dist/auth-api.js +2 -0
- package/dist/auth-api.js.map +1 -1
- package/dist/backend-availability.d.ts +22 -0
- package/dist/backend-availability.js +71 -2
- package/dist/backend-availability.js.map +1 -1
- package/dist/build-provenance.json +1 -1
- package/dist/channel/adapters/telegram.d.ts +2 -0
- package/dist/channel/adapters/telegram.js +3 -0
- package/dist/channel/adapters/telegram.js.map +1 -1
- package/dist/cli-capability.d.ts +3 -0
- package/dist/cli-capability.js.map +1 -1
- package/dist/cli-registry-check.js +1 -1
- package/dist/cli-registry-check.js.map +1 -1
- package/dist/cli-registry.d.ts +1 -0
- package/dist/cli-spec-antigravity.d.ts +1 -0
- package/dist/cli-spec-antigravity.js +3 -1
- package/dist/cli-spec-antigravity.js.map +1 -1
- package/dist/cli.js +8 -0
- package/dist/cli.js.map +1 -1
- package/dist/connect/control.d.ts +20 -0
- package/dist/connect/control.js +236 -0
- package/dist/connect/control.js.map +1 -0
- package/dist/connect/install.d.ts +13 -0
- package/dist/connect/install.js +12 -0
- package/dist/connect/install.js.map +1 -0
- package/dist/connect/protocol.d.ts +38 -0
- package/dist/connect/protocol.js +36 -0
- package/dist/connect/protocol.js.map +1 -0
- package/dist/connect/service.d.ts +19 -0
- package/dist/connect/service.js +79 -0
- package/dist/connect/service.js.map +1 -0
- package/dist/connect/stdio-entry.d.ts +1 -0
- package/dist/connect/stdio-entry.js +6 -0
- package/dist/connect/stdio-entry.js.map +1 -0
- package/dist/connect/stdio.d.ts +5 -0
- package/dist/connect/stdio.js +39 -0
- package/dist/connect/stdio.js.map +1 -0
- package/dist/daemon.js +2 -0
- package/dist/daemon.js.map +1 -1
- package/dist/fleet-manager.d.ts +12 -1
- package/dist/fleet-manager.js +75 -11
- package/dist/fleet-manager.js.map +1 -1
- package/dist/fleet-windows-runtime.js +4 -2
- package/dist/fleet-windows-runtime.js.map +1 -1
- package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +2 -0
- package/dist/general-knowledge/skills/web-dashboard/SKILL.md +15 -1
- package/dist/general-knowledge/skills/worker-collaboration/SKILL.md +2 -0
- package/dist/hub/group-policy/model.d.ts +23 -0
- package/dist/hub/group-policy/model.js +3 -3
- package/dist/hub/group-policy/model.js.map +1 -1
- package/dist/hub/group-policy/store.js +3 -3
- package/dist/hub/group-policy/store.js.map +1 -1
- package/dist/hub/group-policy/team-subjects.d.ts +1 -1
- package/dist/hub/group-policy/team-subjects.js +1 -1
- package/dist/hub/group-policy/team-subjects.js.map +1 -1
- package/dist/hub/http/compose.js +3 -0
- package/dist/hub/http/compose.js.map +1 -1
- package/dist/hub/roles/change.js +4 -0
- package/dist/hub/roles/change.js.map +1 -1
- package/dist/hub/roles/convert.js +1 -1
- package/dist/hub/roles/convert.js.map +1 -1
- package/dist/hub/roles/delegation.js +4 -0
- package/dist/hub/roles/delegation.js.map +1 -1
- package/dist/hub/roles/evaluate.d.ts +2 -1
- package/dist/hub/roles/evaluate.js +14 -0
- package/dist/hub/roles/evaluate.js.map +1 -1
- package/dist/hub/roles/model.d.ts +23 -0
- package/dist/hub/roles/model.js +7 -2
- package/dist/hub/roles/model.js.map +1 -1
- package/dist/human-delivery-receipts.js +8 -0
- package/dist/human-delivery-receipts.js.map +1 -1
- package/dist/instructions.js +3 -0
- package/dist/instructions.js.map +1 -1
- package/dist/locale.js +50 -0
- package/dist/locale.js.map +1 -1
- package/dist/runtime-personal-answer.d.ts +25 -0
- package/dist/runtime-personal-answer.js +115 -0
- package/dist/runtime-personal-answer.js.map +1 -0
- package/dist/runtime-personal-profile.d.ts +34 -0
- package/dist/runtime-personal-profile.js +61 -0
- package/dist/runtime-personal-profile.js.map +1 -0
- package/dist/settings-api.js +5 -0
- package/dist/settings-api.js.map +1 -1
- package/dist/tool-progress.d.ts +9 -0
- package/dist/tool-progress.js +141 -32
- package/dist/tool-progress.js.map +1 -1
- package/dist/turn-reply-guard.d.ts +2 -2
- package/dist/turn-reply-guard.js +3 -3
- package/dist/turn-reply-guard.js.map +1 -1
- package/dist/ui/fleet-office-skin.js +1 -1
- package/dist/ui/hub-quick-pairing.js +7 -2
- package/dist/ui/panel-settings.js +2 -1
- package/dist/ui/settings-connector-strings.js +23 -0
- package/dist/ui/settings-connector.js +39 -0
- package/dist/ui/shared/app-shell.js +6 -4
- package/dist/ui/shared/app-themes.js +2 -2
- package/dist/ui/shared/app.css +207 -139
- package/dist/ui/shared/chat-thread.js +3 -3
- package/dist/ui/shared/chat-work-bar.css +9 -1
- package/dist/ui/shared/connector-prompt.d.ts +2 -0
- package/dist/ui/shared/connector-prompt.js +10 -0
- package/dist/ui/shared/hub-chat.css +1 -1
- package/dist/ui/shared/hub-owner.css +1 -1
- package/dist/ui/shared/hub.css +5 -0
- package/dist/ui/shared/image-lightbox.js +35 -10
- package/dist/ui/shared/image-zoom.js +61 -9
- package/dist/ui/shared/instance-nav.js +35 -6
- package/dist/ui/shared/settings-connector.css +7 -0
- package/dist/ui/shared/theme.js +52 -0
- package/dist/ui/shared/tokens.css +27 -10
- package/dist/ui/shared/view-strings.js +6 -0
- package/dist/web-icons.js +3 -3
- package/dist/web-icons.js.map +1 -1
- package/dist/web-theme.js +2 -2
- package/package.json +1 -1
package/dist/fleet-manager.d.ts
CHANGED
|
@@ -1199,6 +1199,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1199
1199
|
private settingsRuntimeRevision;
|
|
1200
1200
|
private settingsConfirmation;
|
|
1201
1201
|
private settingsControl;
|
|
1202
|
+
private ownerAppControl;
|
|
1202
1203
|
private settingsJobSettlements;
|
|
1203
1204
|
private classicSettingsOwners;
|
|
1204
1205
|
private queueSettingsOperation;
|
|
@@ -1484,6 +1485,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1484
1485
|
private handleKiroReconcileCallback;
|
|
1485
1486
|
private handleSettingsChangeCallback;
|
|
1486
1487
|
startSettingsConfirmationControl(): Promise<void>;
|
|
1488
|
+
/** A person's local app gets a private, read/chat-only surface, never an instance's tool permissions. */
|
|
1489
|
+
startOwnerAppControl(): Promise<void>;
|
|
1487
1490
|
private get webToken();
|
|
1488
1491
|
/**
|
|
1489
1492
|
* Server-side web sessions (see web-session.ts). Created with the token, not per
|
|
@@ -3055,7 +3058,15 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
3055
3058
|
* copies retain their permissive handling when that identity is unknown.
|
|
3056
3059
|
*/
|
|
3057
3060
|
private isOwnerCommandCopy;
|
|
3058
|
-
/**
|
|
3061
|
+
/**
|
|
3062
|
+
* Who a Telegram update that was too old to inject would have gone to live (handleInboundMessageCore), or null when live
|
|
3063
|
+
* delivery would not have taken it — then it is not "missed". A topic of the fleet group: its instance (an unbound topic
|
|
3064
|
+
* only gets the bind prompt live, so nobody). The fleet group's root: general ("" when none is configured). Any other chat
|
|
3065
|
+
* is a ClassicBot candidate: its registered room — in a group only when the message @mentions the bot — and otherwise
|
|
3066
|
+
* nobody (live, an unregistered chat is ignored, and an @mention there only gets the no-agent reply).
|
|
3067
|
+
*/
|
|
3068
|
+
private missedOfflineInstance;
|
|
3069
|
+
/** File a Telegram update that was too old to inject, where live delivery would have taken it; Needs you lists it until Acknowledge. */
|
|
3059
3070
|
private recordMissedOffline;
|
|
3060
3071
|
/**
|
|
3061
3072
|
* #1085: coincident topic numbers must not route across Telegram groups.
|
package/dist/fleet-manager.js
CHANGED
|
@@ -106,7 +106,7 @@ import { getEffectiveInstanceDefaults, loadFleetConfig, loadRawFleetConfig, load
|
|
|
106
106
|
import { EventLog } from "./event-log.js";
|
|
107
107
|
import { binaryProbe } from "./binary-probe.js";
|
|
108
108
|
import { deletePlannedTopic, planInstanceTopicDelete, topicDestination, topicMustStay } from "./instance-topic-delete.js";
|
|
109
|
-
import { AVAILABILITY_STALE_MS, BackendAvailabilityStore,
|
|
109
|
+
import { AVAILABILITY_STALE_MS, BackendAvailabilityStore, structuredSignInReady, hostAvailabilityProbes, findExecutableIn, resolveBackendBinary } from "./backend-availability.js";
|
|
110
110
|
import { classifySqliteOpenError } from "./sqlite-open-errors.js";
|
|
111
111
|
import { OutboxOpenError } from "./outbox-open-error.js";
|
|
112
112
|
import { AdapterWorld } from "./adapter-world.js";
|
|
@@ -3891,6 +3891,7 @@ export class FleetManager {
|
|
|
3891
3891
|
settingsRuntimeRevision = 0;
|
|
3892
3892
|
settingsConfirmation = null;
|
|
3893
3893
|
settingsControl = null;
|
|
3894
|
+
ownerAppControl = null;
|
|
3894
3895
|
settingsJobSettlements = new Map();
|
|
3895
3896
|
classicSettingsOwners = new WeakMap();
|
|
3896
3897
|
queueSettingsOperation(job, resources, execution, run) {
|
|
@@ -5145,6 +5146,45 @@ export class FleetManager {
|
|
|
5145
5146
|
throw err;
|
|
5146
5147
|
}
|
|
5147
5148
|
}
|
|
5149
|
+
/** A person's local app gets a private, read/chat-only surface, never an instance's tool permissions. */
|
|
5150
|
+
async startOwnerAppControl() {
|
|
5151
|
+
if (this.shuttingDown || this.ownerAppControl)
|
|
5152
|
+
return;
|
|
5153
|
+
const [{ OwnerAppControl }, { createOwnerAppService }] = await Promise.all([import("./connect/control.js"), import("./connect/service.js")]);
|
|
5154
|
+
if (this.shuttingDown || this.ownerAppControl)
|
|
5155
|
+
return;
|
|
5156
|
+
const service = createOwnerAppService({
|
|
5157
|
+
current: () => !this.shuttingDown && !!this.fleetConfig,
|
|
5158
|
+
agents: () => Object.entries(this.fleetConfig?.instances ?? {}).map(([name, config]) => ({ name,
|
|
5159
|
+
display_name: config.display_name, backend: config.backend ?? "claude-code", status: this.getInstanceStatus(name) })),
|
|
5160
|
+
identity: name => this.fleetConfig?.instances[name],
|
|
5161
|
+
history: this.webChatHistory,
|
|
5162
|
+
board: () => this.scheduler?.db.board ?? null,
|
|
5163
|
+
deliver: async (name, text, messageId, current) => {
|
|
5164
|
+
if (!current())
|
|
5165
|
+
return false;
|
|
5166
|
+
const config = this.fleetConfig.instances[name];
|
|
5167
|
+
const adapter = this.getAdapterForInstance(name);
|
|
5168
|
+
const result = await this.deliverHumanToInstance(name, { type: "fleet_inbound", targetSession: name, content: text,
|
|
5169
|
+
meta: { chat_id: String(this.getGroupIdForInstance(name) ?? ""), thread_id: String(config.topic_id ?? ""),
|
|
5170
|
+
message_id: messageId, user: "Local app", user_id: "local-connector", source: "app", adapter_id: adapter?.id,
|
|
5171
|
+
ts: new Date().toISOString() } }, undefined, text, { stillCurrent: current, authorityCurrent: () => !this.shuttingDown && this.fleetConfig?.instances[name] === config });
|
|
5172
|
+
// No web-verified origin or human receipt authority is manufactured for an external app.
|
|
5173
|
+
if (result !== false)
|
|
5174
|
+
this.emitSseEvent("message", { instance: name, sender: "Local app", role: "user", text, messageId, ts: new Date().toISOString() });
|
|
5175
|
+
return result;
|
|
5176
|
+
},
|
|
5177
|
+
});
|
|
5178
|
+
const control = this.ownerAppControl = new OwnerAppControl(this.dataDir, service);
|
|
5179
|
+
try {
|
|
5180
|
+
await control.listen();
|
|
5181
|
+
}
|
|
5182
|
+
catch (error) {
|
|
5183
|
+
if (this.ownerAppControl === control)
|
|
5184
|
+
this.ownerAppControl = null;
|
|
5185
|
+
throw error;
|
|
5186
|
+
}
|
|
5187
|
+
}
|
|
5148
5188
|
get webToken() { return readWebToken(this.dataDir); }
|
|
5149
5189
|
/**
|
|
5150
5190
|
* Server-side web sessions (see web-session.ts). Created with the token, not per
|
|
@@ -14048,7 +14088,27 @@ export class FleetManager {
|
|
|
14048
14088
|
}
|
|
14049
14089
|
return true;
|
|
14050
14090
|
}
|
|
14051
|
-
/**
|
|
14091
|
+
/**
|
|
14092
|
+
* Who a Telegram update that was too old to inject would have gone to live (handleInboundMessageCore), or null when live
|
|
14093
|
+
* delivery would not have taken it — then it is not "missed". A topic of the fleet group: its instance (an unbound topic
|
|
14094
|
+
* only gets the bind prompt live, so nobody). The fleet group's root: general ("" when none is configured). Any other chat
|
|
14095
|
+
* is a ClassicBot candidate: its registered room — in a group only when the message @mentions the bot — and otherwise
|
|
14096
|
+
* nobody (live, an unregistered chat is ignored, and an @mention there only gets the no-agent reply).
|
|
14097
|
+
*/
|
|
14098
|
+
missedOfflineInstance(ev, stub) {
|
|
14099
|
+
const threadId = this.inboundRouteThreadId(stub);
|
|
14100
|
+
if (threadId)
|
|
14101
|
+
return this.resolveInboundTarget(stub, threadId)?.name ?? null;
|
|
14102
|
+
if (ev.chatId !== String(this.getChannelConfig(ev.adapterId)?.group_id ?? "")) {
|
|
14103
|
+
const room = this.classicChannels?.getInstanceByChannel(ev.chatId, ev.adapterId);
|
|
14104
|
+
if (!room)
|
|
14105
|
+
return null;
|
|
14106
|
+
const isPrivateChat = !ev.chatId.startsWith("-");
|
|
14107
|
+
return isPrivateChat || ev.mentionsBot ? room : null;
|
|
14108
|
+
}
|
|
14109
|
+
return Object.entries(this.fleetConfig?.instances ?? {}).find(([name, cfg]) => cfg.general_topic && this.getInstanceAdapterId(name) === ev.adapterId)?.[0] ?? "";
|
|
14110
|
+
}
|
|
14111
|
+
/** File a Telegram update that was too old to inject, where live delivery would have taken it; Needs you lists it until Acknowledge. */
|
|
14052
14112
|
recordMissedOffline(ev) {
|
|
14053
14113
|
if (!this.missedOfflineStore)
|
|
14054
14114
|
this.missedOfflineStore = new MissedOfflineStore(this.dataDir);
|
|
@@ -14057,11 +14117,10 @@ export class FleetManager {
|
|
|
14057
14117
|
messageId: ev.messageId, userId: ev.userId, username: ev.username, text: ev.preview,
|
|
14058
14118
|
timestamp: ev.timestamp, isBotMessage: false,
|
|
14059
14119
|
};
|
|
14060
|
-
const
|
|
14061
|
-
|
|
14062
|
-
|
|
14063
|
-
|
|
14064
|
-
instance = Object.entries(this.fleetConfig?.instances ?? {}).find(([name, cfg]) => cfg.general_topic && this.getInstanceAdapterId(name) === ev.adapterId)?.[0] ?? "";
|
|
14120
|
+
const instance = this.missedOfflineInstance(ev, stub);
|
|
14121
|
+
if (instance === null) {
|
|
14122
|
+
this.logger.debug({ adapterId: ev.adapterId, updateId: ev.updateId, chatId: ev.chatId, threadId: ev.threadId }, "Telegram message from while AgEnD was offline is not for this fleet — not filed");
|
|
14123
|
+
return;
|
|
14065
14124
|
}
|
|
14066
14125
|
const place = [ev.chatTitle, ev.threadId ? `#${ev.threadId}` : ""].filter(Boolean).join(" · ") || ev.chatId;
|
|
14067
14126
|
this.missedOfflineStore.add({
|
|
@@ -22052,7 +22111,7 @@ export class FleetManager {
|
|
|
22052
22111
|
* so claiming every retained checkpoint is "completed" would be false. */
|
|
22053
22112
|
composeRetiredBubbleText(entry) {
|
|
22054
22113
|
const elapsed = FleetManager.formatProgressElapsed(Date.now() - (entry.startedAt ?? Date.now()));
|
|
22055
|
-
return
|
|
22114
|
+
return `${t("progress.trace_title", elapsed)}\n${entry.toolProgress}`;
|
|
22056
22115
|
}
|
|
22057
22116
|
/**
|
|
22058
22117
|
* Make a tool summary safe to paste into a channel message.
|
|
@@ -23367,7 +23426,7 @@ export class FleetManager {
|
|
|
23367
23426
|
if (!structuredSignInSupported(backend) || !STRUCTURED_PROFILE_BACKENDS.has(backend))
|
|
23368
23427
|
return false;
|
|
23369
23428
|
const row = this.backendAvailabilityRows().find(r => r.backend === backend);
|
|
23370
|
-
return !!row && row.state !== "not_installed" && row.state !== "too_old" &&
|
|
23429
|
+
return !!row && row.state !== "not_installed" && row.state !== "too_old" && structuredSignInReady(row, hostFacts(backend, "structuredSignIn")?.minVersion);
|
|
23371
23430
|
}
|
|
23372
23431
|
backendSignInTargets() {
|
|
23373
23432
|
const out = [];
|
|
@@ -23378,10 +23437,11 @@ export class FleetManager {
|
|
|
23378
23437
|
// whether it is over, and then it is not signed in (never the other way: the file can't vouch for a login).
|
|
23379
23438
|
const ended = row.state === "usable" && this.claudeSignInEnded(row.backend, null);
|
|
23380
23439
|
// A CLI the dashboard drives with the structured sign-in (registry: `host.structuredSignIn`) although chat's /login and the browser terminal decline it (Antigravity: `agy acp --login`, agy
|
|
23381
|
-
// >= its `minVersion`) is signed in from Settings → Accounts. A CLI that is older, or whose version is not
|
|
23440
|
+
// >= its `minVersion`, or — AGEND-274, only while the version is unknown — its file holds the command's `marker`) is signed in from Settings → Accounts. A CLI that is older, or whose version is not
|
|
23441
|
+
// known and whose file was not seen to hold the marker, keeps "Sign in on the host" (told to update only when the version is known to be older).
|
|
23382
23442
|
const structured = hostFacts(row.backend, "structuredSignIn");
|
|
23383
23443
|
const viaStructured = !!structured && flow?.remoteLogin === "unsupported" && row.state !== "not_installed";
|
|
23384
|
-
const structuredSignIn = viaStructured &&
|
|
23444
|
+
const structuredSignIn = viaStructured && structuredSignInReady(row, structured.minVersion);
|
|
23385
23445
|
// Told to update only when the version is KNOWN to be older: a version that was not read yet is not "too old".
|
|
23386
23446
|
const structuredUpdate = viaStructured && !structuredSignIn && typeof row.version === "string" && /\d/.test(row.version);
|
|
23387
23447
|
out.push({
|
|
@@ -28002,6 +28062,9 @@ export class FleetManager {
|
|
|
28002
28062
|
const settingsControl = this.settingsControl;
|
|
28003
28063
|
this.settingsControl = null;
|
|
28004
28064
|
const settingsControlStopped = settingsControl?.close();
|
|
28065
|
+
const ownerAppControl = this.ownerAppControl;
|
|
28066
|
+
this.ownerAppControl = null;
|
|
28067
|
+
const ownerAppStopped = ownerAppControl?.close();
|
|
28005
28068
|
this.publicLinkAutoOpen?.stop();
|
|
28006
28069
|
const publicStopped = this.publicWebLink?.close("fleet shutdown");
|
|
28007
28070
|
this.webRemoteAccessState?.close(); // #3008: an unsaved switch gets its last write
|
|
@@ -28068,6 +28131,7 @@ export class FleetManager {
|
|
|
28068
28131
|
await hubStopped;
|
|
28069
28132
|
await needsStopped;
|
|
28070
28133
|
await settingsControlStopped;
|
|
28134
|
+
await ownerAppStopped;
|
|
28071
28135
|
await cacheStopped;
|
|
28072
28136
|
await quotaNoticesStopped;
|
|
28073
28137
|
this.quotaNotices = null;
|