@songsid/agend 2.3.5-alpha.12 → 2.3.5-alpha.14

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.
Files changed (139) hide show
  1. package/THIRD_PARTY_NOTICES.md +4 -0
  2. package/dist/agent-export.d.ts +74 -0
  3. package/dist/agent-export.js +362 -0
  4. package/dist/agent-export.js.map +1 -0
  5. package/dist/agent-workspace.d.ts +1 -2
  6. package/dist/agent-workspace.js +8 -29
  7. package/dist/agent-workspace.js.map +1 -1
  8. package/dist/auth-api.js +3 -1
  9. package/dist/auth-api.js.map +1 -1
  10. package/dist/backend/codex.d.ts +7 -14
  11. package/dist/backend/codex.js +25 -29
  12. package/dist/backend/codex.js.map +1 -1
  13. package/dist/backend/grok-mcp.d.ts +5 -0
  14. package/dist/backend/grok-mcp.js +221 -0
  15. package/dist/backend/grok-mcp.js.map +1 -0
  16. package/dist/backend/grok.d.ts +0 -10
  17. package/dist/backend/grok.js +5 -82
  18. package/dist/backend/grok.js.map +1 -1
  19. package/dist/backend/types.d.ts +6 -1
  20. package/dist/backend/types.js.map +1 -1
  21. package/dist/build-provenance.json +1 -1
  22. package/dist/cli.js +45 -12
  23. package/dist/cli.js.map +1 -1
  24. package/dist/codex-pane-ownership.d.ts +13 -0
  25. package/dist/codex-pane-ownership.js +192 -0
  26. package/dist/codex-pane-ownership.js.map +1 -0
  27. package/dist/daemon.d.ts +2 -0
  28. package/dist/daemon.js +89 -8
  29. package/dist/daemon.js.map +1 -1
  30. package/dist/fleet-manager.d.ts +15 -1
  31. package/dist/fleet-manager.js +72 -17
  32. package/dist/fleet-manager.js.map +1 -1
  33. package/dist/hub/client.d.ts +1 -1
  34. package/dist/hub/client.js +11 -0
  35. package/dist/hub/client.js.map +1 -1
  36. package/dist/hub/compose/member.d.ts +2 -2
  37. package/dist/hub/compose/member.js +11 -3
  38. package/dist/hub/compose/member.js.map +1 -1
  39. package/dist/hub/join/local.d.ts +1 -0
  40. package/dist/hub/join/local.js +8 -3
  41. package/dist/hub/join/local.js.map +1 -1
  42. package/dist/hub/member/exposure-api.d.ts +2 -0
  43. package/dist/hub/member/exposure-api.js +4 -2
  44. package/dist/hub/member/exposure-api.js.map +1 -1
  45. package/dist/hub/member/pairing-api.d.ts +2 -2
  46. package/dist/hub/member/pairing-api.js +2 -2
  47. package/dist/hub/member/pairing-api.js.map +1 -1
  48. package/dist/hub/server.js +8 -0
  49. package/dist/hub/server.js.map +1 -1
  50. package/dist/hub-pairing-summary.d.ts +3 -1
  51. package/dist/hub-pairing-summary.js +6 -3
  52. package/dist/hub-pairing-summary.js.map +1 -1
  53. package/dist/install-user-systemd.d.ts +20 -0
  54. package/dist/install-user-systemd.js +55 -0
  55. package/dist/install-user-systemd.js.map +1 -0
  56. package/dist/linux-launchers.d.ts +88 -0
  57. package/dist/linux-launchers.js +296 -0
  58. package/dist/linux-launchers.js.map +1 -0
  59. package/dist/locale.js +91 -4
  60. package/dist/locale.js.map +1 -1
  61. package/dist/runtime-client-store.js +5 -0
  62. package/dist/runtime-client-store.js.map +1 -1
  63. package/dist/runtime-pane-private.d.ts +2 -0
  64. package/dist/runtime-pane-private.js +25 -0
  65. package/dist/runtime-pane-private.js.map +1 -1
  66. package/dist/runtime-pane-private.ps1 +74 -7
  67. package/dist/selection-card.d.ts +4 -3
  68. package/dist/selection-card.js +2 -1
  69. package/dist/selection-card.js.map +1 -1
  70. package/dist/service-installer.js +11 -2
  71. package/dist/service-installer.js.map +1 -1
  72. package/dist/settings-change.d.ts +2 -0
  73. package/dist/settings-change.js +74 -31
  74. package/dist/settings-change.js.map +1 -1
  75. package/dist/settings-confirmation.d.ts +23 -0
  76. package/dist/settings-confirmation.js +13 -2
  77. package/dist/settings-confirmation.js.map +1 -1
  78. package/dist/settings-effect.d.ts +4 -0
  79. package/dist/settings-effect.js +14 -14
  80. package/dist/settings-effect.js.map +1 -1
  81. package/dist/settings-http-confirmation.d.ts +3 -1
  82. package/dist/settings-http-confirmation.js +12 -7
  83. package/dist/settings-http-confirmation.js.map +1 -1
  84. package/dist/settings-summary.d.ts +24 -0
  85. package/dist/settings-summary.js +42 -0
  86. package/dist/settings-summary.js.map +1 -0
  87. package/dist/transcript-delta-reader.d.ts +9 -1
  88. package/dist/transcript-delta-reader.js +37 -8
  89. package/dist/transcript-delta-reader.js.map +1 -1
  90. package/dist/ui/agent-details-settings.js +253 -0
  91. package/dist/ui/agent-export-dialog.js +169 -0
  92. package/dist/ui/agent-export-strings.js +81 -0
  93. package/dist/ui/agent-instructions-field.js +69 -0
  94. package/dist/ui/agent-page-strings.js +148 -0
  95. package/dist/ui/chat-quote.js +12 -17
  96. package/dist/ui/hub-client.js +1 -1
  97. package/dist/ui/hub-company-join-strings.js +1 -1
  98. package/dist/ui/hub-company-join.js +7 -0
  99. package/dist/ui/hub-strings.js +4 -0
  100. package/dist/ui/native-instance-settings.js +47 -14
  101. package/dist/ui/panel-details.js +38 -14
  102. package/dist/ui/panel-fleet.js +2 -2
  103. package/dist/ui/panel-settings.js +12 -9
  104. package/dist/ui/settings-access-overview.js +24 -3
  105. package/dist/ui/settings-confirm.js +5 -5
  106. package/dist/ui/settings-dialogs.js +210 -100
  107. package/dist/ui/settings-hub-company-join.js +69 -14
  108. package/dist/ui/settings-hub.js +13 -5
  109. package/dist/ui/settings-layout.js +0 -2
  110. package/dist/ui/settings-model.js +15 -0
  111. package/dist/ui/shared/access-overview.css +48 -0
  112. package/dist/ui/shared/app-i18n.js +2 -2
  113. package/dist/ui/shared/app-shell.js +144 -3
  114. package/dist/ui/shared/app.css +74 -50
  115. package/dist/ui/shared/instance-nav.js +5 -1
  116. package/dist/ui/shared/view-strings.js +2 -0
  117. package/dist/update-dispatch.d.ts +62 -0
  118. package/dist/update-dispatch.js +69 -2
  119. package/dist/update-dispatch.js.map +1 -1
  120. package/dist/web-api.d.ts +2 -0
  121. package/dist/web-api.js +49 -0
  122. package/dist/web-api.js.map +1 -1
  123. package/dist/web-session.d.ts +4 -2
  124. package/dist/web-session.js +5 -2
  125. package/dist/web-session.js.map +1 -1
  126. package/dist/windows-shortcuts.d.ts +29 -5
  127. package/dist/windows-shortcuts.js +52 -9
  128. package/dist/windows-shortcuts.js.map +1 -1
  129. package/dist/workspace-file-policy.d.ts +2 -0
  130. package/dist/workspace-file-policy.js +31 -0
  131. package/dist/workspace-file-policy.js.map +1 -0
  132. package/dist/workspace-follow.js +2 -1
  133. package/dist/workspace-follow.js.map +1 -1
  134. package/launcher/agend-install.cjs +7 -1
  135. package/package.json +2 -2
  136. package/templates/icons/agend-restart.ico +0 -0
  137. package/templates/icons/agend.ico +0 -0
  138. package/templates/runtime-assets/runtime-pane-private.ps1 +74 -7
  139. package/templates/windows-shortcuts.ps1 +45 -12
@@ -27,6 +27,7 @@ import { toast } from "/assets/ui-toast.js";
27
27
  import { GroupMark, groupLabel, groupOf as navGroupOf, modelText } from "/assets/instance-nav.js";
28
28
  import "./settings-strings.js";
29
29
  import "./settings-shared-strings.js"; // see settings-shared.js: the words Shared agent settings added, which an older settings-strings.js in an open tab lacks
30
+ import "./agent-page-strings.js"; // the confirmation text of the MCP proxy reply
30
31
  import "./settings-restart-strings.js"; // S-92: the restart words for a fleet with no chat connection (a file of its own: an open tab may hold an old settings-strings.js)
31
32
  import "./settings-access-strings.js"; // the words Access & security added (settings.webLoginQr…): an older settings-strings.js from a tab that visited Fleet first lacks them (#3061)
32
33
  import { UpdatePillMark, UpdateSection } from "./settings-update.js";
@@ -62,7 +63,7 @@ import { syncStage, useDraft } from "./settings-draft.js";
62
63
  import { WebAuthorityCard } from "./settings-web-authority.js";
63
64
  import { OutsideCard } from "./settings-outside.js";
64
65
  import { DevicesCard } from "./settings-devices.js";
65
- import { AccessOverview } from "./settings-access-overview.js";
66
+ import { AccessOverview, accessOverviewLabel } from "./settings-access-overview.js";
66
67
  import { HubSection, hubSectionText } from "./settings-hub-section.js";
67
68
  import { NamedLinkTest, setTypedTunnelToken } from "./settings-named-test.js";
68
69
  import { SignInList } from "./backend-signin.js";
@@ -102,7 +103,7 @@ async function read(lease, path) {
102
103
 
103
104
  let loads = 0;
104
105
  /** Everything the panel shows, in the order the old page read it. Returns null if the lease ended meanwhile. */
105
- async function loadAll(lease) {
106
+ export async function loadAll(lease) {
106
107
  const out = { schema: DEFAULT_SCHEMA };
107
108
  const schema = await read(lease, "/api/settings/schema");
108
109
  if (!lease.current()) return null;
@@ -345,7 +346,7 @@ export function SettingsPanel({ route, navKey }) {
345
346
  // A panel that went while a question was open asks nothing more, and says nothing.
346
347
  for (const c of [...stagedRef.current.values()]) {
347
348
  for (const k of c.confirms || []) {
348
- const yes = await ask(tn(k));
349
+ const yes = await ask(k.includes(".") ? t(k) : tn(k));
349
350
  if (!mount.current()) return;
350
351
  if (!yes) { toast(tn("accessChangeCancelled"), false); return; }
351
352
  }
@@ -517,7 +518,7 @@ export function SettingsPanel({ route, navKey }) {
517
518
  </${PanelHeader}>
518
519
  <nav data-trust="panel-navigation" class="seg s-nav" aria-label=${tn("title")}><${SettingsSearch} /><div class="s-nav-groups">${SETTINGS_GROUPS.map((g) => html`<div key=${g.id} class="s-nav-group" role="group" aria-labelledby=${`s-grp-${g.id}`}>
519
520
  <span class="s-nav-head" id=${`s-grp-${g.id}`}>${tn(`grp_${g.id}`)}</span>
520
- ${g.sections.map((k) => html`<a key=${k} href=${sectionPath(k)} class=${`seg-item${k === section ? " active" : ""}`}
521
+ ${g.sections.map((k) => html`<a key=${k} href=${sectionPath(k)} class=${`seg-item${k === section ? " active" : ""}`} title=${tn(`sec_${k}`)}
521
522
  aria-current=${k === section ? "page" : undefined}><${Icon} name=${ICONS[k]} size=${16} /><span>${tn(`sec_${k}`)}</span></a>`)}</div>`)}</div></nav>
522
523
  <div data-trust="panel-content" class="panel-body"><div class="col" data-settings-section=${section}>
523
524
  <a class="s-back" href=${settingsPath()}><${Icon} name="back" size=${16} /><span>${tn("title")}</span><span class="s-back-here">${tn(`sec_${section}`)}</span></a>
@@ -739,7 +740,7 @@ export function ProfileCard({ embedded = false } = {}) {
739
740
  }
740
741
 
741
742
  /** The operation in hand still owns Apply: its writes and job, or a restart of AgEnD from the press to its end. */
742
- const opBusy = (op) => !!op && (["writing", "posting", "watching"].includes(op.phase) || op.restart === "busy");
743
+ export const opBusy = (op) => !!op && (["writing", "posting", "watching"].includes(op.phase) || op.restart === "busy");
743
744
  function dropSecrets(staged) { for (const c of staged.values()) if (c.connectionSecret) c.connectionSecret.secret = ""; }
744
745
 
745
746
  function renderDialog(d, ctx, close) {
@@ -753,7 +754,7 @@ function renderDialog(d, ctx, close) {
753
754
  }
754
755
 
755
756
  /** What the sections and dialogs work with: the data, and the ways to change it (staging, or a direct write). */
756
- function makeCtx(data, setData, stage, unstage, reload, reloadLive, alive, extra = {}) {
757
+ export function makeCtx(data, setData, stage, unstage, reload, reloadLive, alive, extra = {}) {
757
758
  const { fleet, classic, schema } = data;
758
759
  const chs = channelsOf(fleet);
759
760
  const edit = (fn) => setData((d) => { const next = structuredClone(d); fn(next); return next; });
@@ -777,6 +778,8 @@ function makeCtx(data, setData, stage, unstage, reload, reloadLive, alive, extra
777
778
  });
778
779
  stage(`agent:${name}`, {
779
780
  label: tn("updateAgent", shortName(name, { ...inst, ...patch })),
781
+ // turning the MCP proxy reply on is asked about first (agent-page-strings.js).
782
+ ...(patch.mcp_proxy_reply === true ? { confirms: ["agentPage.confirmMcpProxy"] } : {}),
780
783
  impact: inst.runtime === "windows" ? "now" : batchImpact(schema, Object.keys(patch), (k) => impactOf(schema, `instance.${k}`)),
781
784
  request: { method: "PATCH", url: inst.runtime === "windows" ? `/ui/instances/${encodeURIComponent(name)}` : `/api/settings/fleet/instances/${encodeURIComponent(name)}`, body: patch },
782
785
  });
@@ -1374,7 +1377,7 @@ function WebSection({ ctx, staged, part = "all" }) {
1374
1377
  const has = (p) => part === "all" || part === p;
1375
1378
  const lock = (body) => html`<fieldset class="s-web-fields" disabled=${overPublicLink}>${body}</fieldset>`;
1376
1379
  const tabs = [
1377
- { id: "overview", label: layoutText("accessOverview") },
1380
+ { id: "overview", label: accessOverviewLabel() },
1378
1381
  { id: "login", label: layoutText("accessLogin") },
1379
1382
  { id: "guests", label: layoutText("accessGuests") },
1380
1383
  { id: "sharing", label: layoutText("accessSharing") },
@@ -1553,7 +1556,7 @@ function Developer({ ctx }) {
1553
1556
  * #2347: the section's Save. Shown while anything is unsaved: how many changes, what they will cost, Discard and Save —
1554
1557
  * Save waits while a field is invalid ("Fix 1 field to save").
1555
1558
  */
1556
- function PendingBar({ staged, busy, onApply, onDiscard, section }) {
1559
+ export function PendingBar({ staged, busy, onApply, onDiscard, section }) {
1557
1560
  const changes = [...staged.values()];
1558
1561
  // What Save will cost, one line each: a change that knows its own words (the shared agent settings: how many agents
1559
1562
  // restart) says them; any other says its impact label.
@@ -1580,7 +1583,7 @@ function PendingBar({ staged, busy, onApply, onDiscard, section }) {
1580
1583
  }
1581
1584
 
1582
1585
  /** The Apply in hand (the app's, settings-apply.js): its writes, its job, and a restart when one is needed. */
1583
- function OperationCard({ op, schema }) {
1586
+ export function OperationCard({ op, schema }) {
1584
1587
  const [restarting, setRestarting] = useState(false);
1585
1588
  const busy = opBusy(op); // nothing to dismiss while it, or its restart, runs
1586
1589
  const phaseBusy = ["writing", "posting", "watching"].includes(op.phase);
@@ -17,7 +17,7 @@ import { roleName } from "/assets/device-roles.js";
17
17
 
18
18
  register("accessov", {
19
19
  en: {
20
- devicesTitle: "Signed-in devices", devicesCount: "{0} signed in", more: "{0} more in Devices & sign-in", manageDevices: "Devices & sign-in", manageGuests: "Guests",
20
+ tab: "Overview", devicesTitle: "Signed-in devices", devicesCount: "{0} signed in", more: "{0} more in Devices & sign-in", manageDevices: "Devices & sign-in", manageGuests: "Guests",
21
21
  legend: "✓ the verified owner: may add devices and sign others out. Not verified: everyday use only.",
22
22
  blockedOwner: "Verify as the owner first to sign out other devices.", blockedOther: "Another admin's device: only that admin can sign it out.",
23
23
  signOutTitle: "Sign out {0}?", signOutLead: "{0} is signed out at once and has to sign in again.", signedOut: "{0} was signed out.",
@@ -36,7 +36,7 @@ register("accessov", {
36
36
  accounts: "AI accounts", accountsHint: "The Claude, Codex and other accounts your agents use", hubOn: "Connected", paired: "{0} connected",
37
37
  },
38
38
  "zh-TW": {
39
- devicesTitle: "已登入的裝置", devicesCount: "{0} 個登入", more: "另外 {0} 個,到「裝置與登入」查看", manageDevices: "裝置與登入", manageGuests: "訪客",
39
+ tab: "總覽", devicesTitle: "已登入的裝置", devicesCount: "{0} 個登入", more: "另外 {0} 個,到「裝置與登入」查看", manageDevices: "裝置與登入", manageGuests: "訪客",
40
40
  legend: "✓ 已驗證的擁有者:可新增裝置、登出其他裝置。未驗證:只能使用一般功能。",
41
41
  blockedOwner: "要先驗證為擁有者,才能登出其他裝置。", blockedOther: "別的管理員的裝置,只有那位管理員本人能登出。",
42
42
  signOutTitle: "登出 {0}?", signOutLead: "{0} 會立即登出,之後需要重新登入。", signedOut: "已登出 {0}。",
@@ -56,6 +56,22 @@ register("accessov", {
56
56
  },
57
57
  });
58
58
  const to = (k, ...a) => t(`accessov.${k}`, ...a);
59
+ /** M-2855: the tab's own label (a tab opened before this page existed holds an older settings-layout.js without it). */
60
+ export const accessOverviewLabel = () => to("tab");
61
+
62
+ /**
63
+ * M-2855: this page's stylesheet, linked once when the module loads (a tab opened before this page existed holds an
64
+ * older app.css with none of its rules). Before first render, so the cards never paint unstyled.
65
+ */
66
+ export function linkAccessOverviewCss(doc = typeof document !== "undefined" ? document : null) {
67
+ try {
68
+ if (!doc || !doc.head || doc.querySelector('link[data-access-overview-css="1"]')) return;
69
+ const link = doc.createElement("link");
70
+ link.setAttribute("rel", "stylesheet"); link.setAttribute("href", "/assets/access-overview.css"); link.setAttribute("data-access-overview-css", "1");
71
+ doc.head.appendChild(link);
72
+ } catch { /* the page still works without it */ }
73
+ }
74
+ linkAccessOverviewCss();
59
75
  const SHOWN = 4;
60
76
  const leftWords = (ms) => { const m = Math.max(1, Math.round(ms / 60_000)); return m >= 60 ? (m % 60 ? to("hm", Math.floor(m / 60), m % 60) : to("h", Math.floor(m / 60))) : to("m", m); };
61
77
  const day = (ms) => { const d = new Date(ms); return `${d.getFullYear()}/${String(d.getMonth() + 1).padStart(2, "0")}/${String(d.getDate()).padStart(2, "0")}`; };
@@ -74,6 +90,9 @@ export function AccessOverview({ web = {}, hub, openTab, overPublicLink, active
74
90
  const [shares, setShares] = useState(null), [machines, setMachines] = useState(null);
75
91
  const [ask, setAsk] = useState(null), [askClose, setAskClose] = useState(false), [linkNote, setLinkNote] = useState("");
76
92
  const { publicLink } = useStore(appStore);
93
+ // #3600: the status frame this page saw when its close went through. Until the next frame arrives (each frame is a new
94
+ // object), that frame still says "open" for a link that is already closed: it is shown as closed, at once.
95
+ const [closedFrame, setClosedFrame] = useState(null);
77
96
  const [busy, setBusy] = useState(false);
78
97
  const [note, setNote] = useState("");
79
98
  const load = async () => {
@@ -98,14 +117,16 @@ export function AccessOverview({ web = {}, hub, openTab, overPublicLink, active
98
117
  };
99
118
  // The link's state: the shell's status frame (every fleet; a tab from before S-120 has none — then /ui/outside's).
100
119
  const pub = web.public_link || {};
101
- const framed = publicLink && publicLink.state !== "closed" ? { ...publicLink, quick: !pub.hostname } : null;
120
+ const framed = publicLink && publicLink.state !== "closed" && publicLink !== closedFrame ? { ...publicLink, quick: !pub.hostname } : null;
102
121
  const link = framed || (outside && outside.link) || null;
103
122
  // A web-only fleet's outside link is the owner's switch (#3008): closed there, not here (the route answers 409).
104
123
  const outsideOwned = !!(link && outside && outside.webOnly && outside.outside);
105
124
  const closeLink = async () => {
106
125
  setBusy(true);
126
+ const seen = publicLink;
107
127
  const r = await api("/ui/public-link/close", { method: "POST", body: "{}" });
108
128
  setBusy(false); setAskClose(false);
129
+ if (r.ok && r.body && r.body.closed === true) setClosedFrame(seen); // only a close that happened; a refusal changes nothing
109
130
  setLinkNote(r.ok ? to("closed") : r.body && r.body.error === "outside_link" ? to("outsideOwned") : to("closeFailed"));
110
131
  load();
111
132
  };
@@ -63,8 +63,7 @@ const finals = new Map(); // id → its decided view
63
63
  let timer = null, polling = false;
64
64
 
65
65
  function publish() {
66
- appStore.set({
67
- pendingChanges: [...tracked.values()].map(({ view, at, label, retry, displaySummary }) => ({
66
+ const views = [...tracked.values()].map(({ view, at, label, retry, displaySummary }) => ({
68
67
  ...view,
69
68
  label: label || null,
70
69
  // Display only: the server owns the diff, confirmation digest and execution.
@@ -84,8 +83,9 @@ function publish() {
84
83
  dismiss: TERMINAL.has(view.state) ? () => forget(view.id) : null,
85
84
  // AGEND-118: a request that ended without applying can be sent again (the same write, a new confirmation).
86
85
  retry: retry && resendable(view) ? () => resend(view.id) : null,
87
- })),
88
- });
86
+ }));
87
+ appStore.set({ pendingChanges: views.filter(view => view.presentation !== "hub-join"),
88
+ hubJoinChanges: views.filter(view => view.presentation === "hub-join") });
89
89
  }
90
90
 
91
91
  function forget(id) {
@@ -303,5 +303,5 @@ export function resetConfirmations() {
303
303
  for (const e of tracked.values()) if (e.doneTimer) clearTimeout(e.doneTimer);
304
304
  tracked.clear(); finals.clear();
305
305
  if (timer) { clearTimeout(timer); timer = null; }
306
- appStore.set({ pendingChanges: [] });
306
+ appStore.set({ pendingChanges: [], hubJoinChanges: [] });
307
307
  }