@songsid/agend 2.3.3 → 2.3.4-beta.2

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 (143) hide show
  1. package/README.md +3 -3
  2. package/README.zh-TW.md +3 -3
  3. package/dist/agent-cli-instructions.md +1 -1
  4. package/dist/auth-api.d.ts +16 -3
  5. package/dist/auth-api.js +22 -6
  6. package/dist/auth-api.js.map +1 -1
  7. package/dist/authority/web-authority.d.ts +15 -1
  8. package/dist/authority/web-authority.js +27 -10
  9. package/dist/authority/web-authority.js.map +1 -1
  10. package/dist/backend/claude-code.js +11 -1
  11. package/dist/backend/claude-code.js.map +1 -1
  12. package/dist/backend/codex.js +12 -0
  13. package/dist/backend/codex.js.map +1 -1
  14. package/dist/backend/types.d.ts +7 -0
  15. package/dist/backend/types.js.map +1 -1
  16. package/dist/channel/adapters/discord.js +13 -0
  17. package/dist/channel/adapters/discord.js.map +1 -1
  18. package/dist/chat-log-ids.d.ts +48 -0
  19. package/dist/chat-log-ids.js +182 -0
  20. package/dist/chat-log-ids.js.map +1 -0
  21. package/dist/classic-channel-manager.d.ts +8 -1
  22. package/dist/classic-channel-manager.js +24 -2
  23. package/dist/classic-channel-manager.js.map +1 -1
  24. package/dist/config-validator.js +18 -1
  25. package/dist/config-validator.js.map +1 -1
  26. package/dist/daemon.js +8 -1
  27. package/dist/daemon.js.map +1 -1
  28. package/dist/env-file.d.ts +2 -0
  29. package/dist/env-file.js +13 -8
  30. package/dist/env-file.js.map +1 -1
  31. package/dist/fleet-manager.d.ts +42 -1
  32. package/dist/fleet-manager.js +206 -23
  33. package/dist/fleet-manager.js.map +1 -1
  34. package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +1 -1
  35. package/dist/general-knowledge/skills/web-dashboard/SKILL.md +4 -0
  36. package/dist/general-knowledge/skills/worker-collaboration/SKILL.md +1 -1
  37. package/dist/instance-config-impact.js +1 -0
  38. package/dist/instance-config-impact.js.map +1 -1
  39. package/dist/instance-lifecycle.d.ts +2 -0
  40. package/dist/instance-lifecycle.js +23 -7
  41. package/dist/instance-lifecycle.js.map +1 -1
  42. package/dist/instructions.d.ts +1 -1
  43. package/dist/instructions.js +1 -1
  44. package/dist/instructions.js.map +1 -1
  45. package/dist/interaction-observation.d.ts +1 -0
  46. package/dist/interaction-observation.js +1 -1
  47. package/dist/interaction-observation.js.map +1 -1
  48. package/dist/locale.js +48 -0
  49. package/dist/locale.js.map +1 -1
  50. package/dist/next-steps.d.ts +12 -2
  51. package/dist/next-steps.js +19 -3
  52. package/dist/next-steps.js.map +1 -1
  53. package/dist/office-share-service.d.ts +57 -0
  54. package/dist/office-share-service.js +76 -11
  55. package/dist/office-share-service.js.map +1 -1
  56. package/dist/office-share.d.ts +8 -0
  57. package/dist/office-share.js +34 -0
  58. package/dist/office-share.js.map +1 -1
  59. package/dist/outbound-schemas.js +1 -1
  60. package/dist/outbound-schemas.js.map +1 -1
  61. package/dist/page-share.d.ts +122 -0
  62. package/dist/page-share.js +199 -0
  63. package/dist/page-share.js.map +1 -0
  64. package/dist/public-preview.d.ts +4 -0
  65. package/dist/public-preview.js +5 -4
  66. package/dist/public-preview.js.map +1 -1
  67. package/dist/public-web-gateway.js +5 -0
  68. package/dist/public-web-gateway.js.map +1 -1
  69. package/dist/quickstart-api.d.ts +5 -0
  70. package/dist/quickstart-api.js +1 -1
  71. package/dist/quickstart-api.js.map +1 -1
  72. package/dist/quickstart.d.ts +40 -0
  73. package/dist/quickstart.js +174 -28
  74. package/dist/quickstart.js.map +1 -1
  75. package/dist/remote-card-answer.js +2 -0
  76. package/dist/remote-card-answer.js.map +1 -1
  77. package/dist/remote-card-prompt.js +4 -2
  78. package/dist/remote-card-prompt.js.map +1 -1
  79. package/dist/selection-card.d.ts +21 -0
  80. package/dist/selection-card.js +129 -0
  81. package/dist/selection-card.js.map +1 -0
  82. package/dist/settings-api.js +4 -0
  83. package/dist/settings-api.js.map +1 -1
  84. package/dist/settings-change.js +5 -0
  85. package/dist/settings-change.js.map +1 -1
  86. package/dist/settings-effect.js +2 -0
  87. package/dist/settings-effect.js.map +1 -1
  88. package/dist/setup-host.js +2 -2
  89. package/dist/setup-host.js.map +1 -1
  90. package/dist/setup-wizard.js +2 -2
  91. package/dist/setup-wizard.js.map +1 -1
  92. package/dist/types.d.ts +10 -0
  93. package/dist/ui/chat-store.js +8 -1
  94. package/dist/ui/chat-strings.js +38 -2
  95. package/dist/ui/chat-thread.js +52 -10
  96. package/dist/ui/page-share-dialog.js +191 -0
  97. package/dist/ui/panel-chat.js +14 -0
  98. package/dist/ui/panel-notices.js +98 -0
  99. package/dist/ui/panel-settings.js +9 -2
  100. package/dist/ui/preview-pages.js +41 -0
  101. package/dist/ui/preview-panel-actions.js +161 -0
  102. package/dist/ui/preview-panel.js +209 -28
  103. package/dist/ui/preview-versions.js +155 -0
  104. package/dist/ui/preview.js +88 -3
  105. package/dist/ui/settings-registry.js +1 -0
  106. package/dist/ui/settings-strings.js +4 -0
  107. package/dist/ui/shared/app-i18n.js +2 -2
  108. package/dist/ui/shared/app-route.js +4 -0
  109. package/dist/ui/shared/app-shell.js +5 -3
  110. package/dist/ui/shared/app-store.js +71 -1
  111. package/dist/ui/shared/app-stream.js +1 -1
  112. package/dist/ui/shared/app.css +57 -3
  113. package/dist/ui/shared/app.js +22 -1
  114. package/dist/ui/shared/signin.js +12 -1
  115. package/dist/ui/shared/ui-icons.js +3 -0
  116. package/dist/ui/shared/web-authorize.js +3 -1
  117. package/dist/web-api.d.ts +26 -0
  118. package/dist/web-api.js +180 -1
  119. package/dist/web-api.js.map +1 -1
  120. package/dist/web-auth.js +7 -1
  121. package/dist/web-auth.js.map +1 -1
  122. package/dist/web-login.d.ts +2 -0
  123. package/dist/web-login.js +3 -1
  124. package/dist/web-login.js.map +1 -1
  125. package/dist/web-notices.d.ts +51 -0
  126. package/dist/web-notices.js +118 -0
  127. package/dist/web-notices.js.map +1 -0
  128. package/dist/web-only-fleet.d.ts +22 -0
  129. package/dist/web-only-fleet.js +13 -0
  130. package/dist/web-only-fleet.js.map +1 -0
  131. package/dist/web-preview.d.ts +32 -3
  132. package/dist/web-preview.js +52 -19
  133. package/dist/web-preview.js.map +1 -1
  134. package/dist/web-session.d.ts +7 -0
  135. package/dist/web-session.js +2 -0
  136. package/dist/web-session.js.map +1 -1
  137. package/dist/web-settings-patch.d.ts +3 -1
  138. package/dist/web-settings-patch.js +4 -1
  139. package/dist/web-settings-patch.js.map +1 -1
  140. package/dist/web-shell-routes.d.ts +2 -0
  141. package/dist/web-shell-routes.js +3 -0
  142. package/dist/web-shell-routes.js.map +1 -1
  143. package/package.json +1 -1
@@ -9,3 +9,5 @@
9
9
  * - a key that appears twice: the last one wins.
10
10
  */
11
11
  export declare function parseEnvText(text: string): Map<string, string>;
12
+ /** The key a .env line sets, as parseEnvText reads it (`export KEY=…` included); null for a blank, comment or keyless line. */
13
+ export declare function envLineKey(line: string): string | null;
package/dist/env-file.js CHANGED
@@ -11,17 +11,22 @@
11
11
  export function parseEnvText(text) {
12
12
  const out = new Map();
13
13
  for (const line of text.split("\n")) {
14
- const trimmed = line.trim();
15
- if (!trimmed || trimmed.startsWith("#"))
16
- continue;
17
- const eqIdx = trimmed.indexOf("=");
18
- if (eqIdx < 0)
19
- continue;
20
- const key = trimmed.slice(0, eqIdx).replace(/^export\s+/, "").trim();
14
+ const key = envLineKey(line);
21
15
  if (!key)
22
16
  continue;
23
- out.set(key, trimmed.slice(eqIdx + 1).replace(/^["'](.*)["']$/, "$1"));
17
+ const trimmed = line.trim();
18
+ out.set(key, trimmed.slice(trimmed.indexOf("=") + 1).replace(/^["'](.*)["']$/, "$1"));
24
19
  }
25
20
  return out;
26
21
  }
22
+ /** The key a .env line sets, as parseEnvText reads it (`export KEY=…` included); null for a blank, comment or keyless line. */
23
+ export function envLineKey(line) {
24
+ const trimmed = line.trim();
25
+ if (!trimmed || trimmed.startsWith("#"))
26
+ return null;
27
+ const eqIdx = trimmed.indexOf("=");
28
+ if (eqIdx < 0)
29
+ return null;
30
+ return trimmed.slice(0, eqIdx).replace(/^export\s+/, "").trim() || null;
31
+ }
27
32
  //# sourceMappingURL=env-file.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"env-file.js","sourceRoot":"","sources":["../src/env-file.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,MAAM,UAAU,YAAY,CAAC,IAAY;IACvC,MAAM,GAAG,GAAG,IAAI,GAAG,EAAkB,CAAC;IACtC,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;QACpC,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;QAC5B,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC;YAAE,SAAS;QAClD,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACnC,IAAI,KAAK,GAAG,CAAC;YAAE,SAAS;QACxB,MAAM,GAAG,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;QACrE,IAAI,CAAC,GAAG;YAAE,SAAS;QACnB,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,OAAO,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAC,CAAC;IACzE,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
1
+ {"version":3,"file":"env-file.js","sourceRoot":"","sources":["../src/env-file.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,MAAM,UAAU,YAAY,CAAC,IAAY;IACvC,MAAM,GAAG,GAAG,IAAI,GAAG,EAAkB,CAAC;IACtC,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;QACpC,MAAM,GAAG,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;QAC7B,IAAI,CAAC,GAAG;YAAE,SAAS;QACnB,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;QAC5B,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAC,CAAC;IACxF,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,+HAA+H;AAC/H,MAAM,UAAU,UAAU,CAAC,IAAY;IACrC,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;IAC5B,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC;IACrD,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACnC,IAAI,KAAK,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC;IAC3B,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,IAAI,IAAI,CAAC;AAC1E,CAAC"}
@@ -4,6 +4,7 @@ import { AppIconStore } from "./web-app-icon.js";
4
4
  import { type NamedTestResult } from "./tunnel/named-link-test.js";
5
5
  import { OfficeShareService } from "./office-share-service.js";
6
6
  import { type OfficeShare } from "./office-share.js";
7
+ import type { PageShare } from "./page-share.js";
7
8
  import type { LoginCodeOwner } from "./web-login.js";
8
9
  import { type ProfileTicket } from "./runtime-cpu-profile.js";
9
10
  import type { CpuProfile } from "./cpu-profile.js";
@@ -100,6 +101,7 @@ import { type MemoryHog } from "./memory-hogs.js";
100
101
  import { type CacheReport } from "./cache-service.js";
101
102
  import { type WebCommandResult } from "./web-commands.js";
102
103
  import { type SessionRecord } from "./web-session.js";
104
+ import { WebNotices } from "./web-notices.js";
103
105
  import { VERIFIED_SESSION_HOURS, type HumanAuthority, type WebAuthorityRefusal, type WebAuthorityResult, type WebPeer } from "./authority/web-authority.js";
104
106
  import { type AuthorityState } from "./authority/authority-state.js";
105
107
  import { type SessionAuthorization } from "./authority/session-authorizations.js";
@@ -113,6 +115,7 @@ import { type CarryResult } from "./backend/claude-carry.js";
113
115
  import { StormWindow } from "./storm-window.js";
114
116
  import { SpawnGate } from "./spawn-gate.js";
115
117
  import { BackendOutageTracker } from "./backend-outage.js";
118
+ import { OwnStatusMessages } from "./chat-log-ids.js";
116
119
  /** #2348: how a guest sign-in code's issuance ended (issueGuestCode), for Settings → Guests' Send sign-in code. */
117
120
  export type GuestCodeOutcome = {
118
121
  kind: "sent";
@@ -687,6 +690,10 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
687
690
  * `share` null with `count`: "Revoke all".
688
691
  */
689
692
  officeShareNotice(event: "created" | "revoked", who: string, share: OfficeShare | null, count: number): void;
693
+ /** #2911: the open page shares changed — the page hears it; each one handed out that ended is said in its channel. */
694
+ pageSharesChanged(_list: PageShare[], ended: PageShare[]): void;
695
+ /** #2911: a page share was made — said in the channel of the instance whose chat it came from (never its URL). */
696
+ pageShareNotice(who: string, share: PageShare): void;
690
697
  /** A share's owner: a person (`person:<adapter>:<user>`) still a fleet admin there; the host's own admin session stays. */
691
698
  private officeShareOwnerCurrent;
692
699
  private officeActsInstance?;
@@ -2289,7 +2296,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
2289
2296
  private handleOutboundFromInstance;
2290
2297
  /** Side effects of a routed reply: cancel-button lifecycle, logs, SSE, chat log. */
2291
2298
  /** No chat platform is configured at all: the web dashboard is the fleet's only surface. */
2292
- private isWebOnlyFleet;
2299
+ /** #2910: no Discord or Telegram connection at all (src/web-only-fleet.ts). */
2300
+ isWebOnlyFleet(): boolean;
2293
2301
  /** On a fleet with no chat platform, the dashboard is where an instance-health prompt is posted (#1307 item 6). */
2294
2302
  private webOnlyPromptPlace;
2295
2303
  /** Resolves when the reply is in the web chat (#1770: after its files are copied); the caller need not wait. */
@@ -2852,6 +2860,16 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
2852
2860
  notifyFleetError(text: string, opts?: {
2853
2861
  throttle?: boolean;
2854
2862
  }): boolean;
2863
+ private webNotices;
2864
+ /** #2910 D2 (web-api): the Notices on a web-only fleet; null on any other (its General says them). */
2865
+ webNoticesFeed(): WebNotices | null;
2866
+ /** #2910 D2: the web-only fleet's Notices (web-notices.json), read on first use. */
2867
+ webNoticeStore(): WebNotices | null;
2868
+ /**
2869
+ * #2910 D2: on a web-only fleet (no chat connection at all), keep what General or an agent's topic would have been
2870
+ * told as a Notice, and push it to the dashboard. False on any other fleet (its chat says it; nothing is kept).
2871
+ */
2872
+ private recordWebNotice;
2855
2873
  private static readonly FLEET_ERROR_THROTTLE_MS;
2856
2874
  private fleetErrorNotices;
2857
2875
  /**
@@ -3144,6 +3162,13 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
3144
3162
  ok: false;
3145
3163
  refusal: WebAuthorityRefusal;
3146
3164
  };
3165
+ /**
3166
+ * #2910 D1 (auth-api, at sign-in): a web-only fleet's host session — signed in with the host's own code (`agend web
3167
+ * --code`) on this computer — is the host operator, authorized from now for max_session_hours (as an account's
3168
+ * Confirm would be), under the current epoch: a revocation ends it, and only a new sign-in on this computer gives it
3169
+ * again. A fleet with a chat connection, another session, or another peer: nothing (§3 as before).
3170
+ */
3171
+ authorizeHostSession(session: SessionRecord, peer: WebPeer): void;
3147
3172
  private authorityStateStore;
3148
3173
  /**
3149
3174
  * #1939 §10: the switch, "Only this computer can authorize" and the revocation epoch in force for the configuration as
@@ -3759,6 +3784,22 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
3759
3784
  * text is its command path — and other sources pass through untouched.
3760
3785
  */
3761
3786
  private replyDiscordNotACommand;
3787
+ /** #2940: this fleet's own status bubbles and the messages the platform said were deleted (ids, never text). */
3788
+ readonly ownStatusMessages: OwnStatusMessages;
3789
+ /**
3790
+ * #2940: a status bubble of ours was posted: never logged, and a line already logged for it (by a sibling bot) goes.
3791
+ * Discord only (#2943 review: the only platform where our bots see each other's posts), keyed by channel and id.
3792
+ */
3793
+ private noteOwnStatusMessage;
3794
+ /** #2940: Discord says a message was deleted — its chat-log line goes, and it is never logged after this. */
3795
+ onPlatformMessageDeleted(e: {
3796
+ messageId?: string;
3797
+ channelId?: string;
3798
+ } | undefined): void;
3799
+ /** #2940: the key a Discord message's chat-log line is kept under (none for another platform: nothing is tracked). */
3800
+ private chatLogKey;
3801
+ /** #2940: whether `msg` must not enter the chat log (only its key is looked at; the debug trail names keys, not text). */
3802
+ private chatLogExcludes;
3762
3803
  /** Handle a message in a classic channel: log it, forward only /chat messages */
3763
3804
  private handleClassicChannelMessage;
3764
3805
  /** Download photo or document attachment to classic instance workspace inbox. Returns { path, kind } or undefined. */