@songsid/agend 2.1.6-beta.8 → 2.1.6

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 (45) hide show
  1. package/dist/backend/codex.d.ts +52 -0
  2. package/dist/backend/codex.js +618 -35
  3. package/dist/backend/codex.js.map +1 -1
  4. package/dist/backend/kiro.d.ts +9 -0
  5. package/dist/backend/kiro.js +129 -0
  6. package/dist/backend/kiro.js.map +1 -1
  7. package/dist/backend/muse.d.ts +37 -4
  8. package/dist/backend/muse.js +150 -61
  9. package/dist/backend/muse.js.map +1 -1
  10. package/dist/backend/types.d.ts +25 -1
  11. package/dist/backend/types.js.map +1 -1
  12. package/dist/daemon.d.ts +98 -10
  13. package/dist/daemon.js +836 -94
  14. package/dist/daemon.js.map +1 -1
  15. package/dist/fleet-manager.d.ts +68 -2
  16. package/dist/fleet-manager.js +290 -81
  17. package/dist/fleet-manager.js.map +1 -1
  18. package/dist/instance-lifecycle.d.ts +17 -0
  19. package/dist/instance-lifecycle.js +118 -5
  20. package/dist/instance-lifecycle.js.map +1 -1
  21. package/dist/locale.js +22 -0
  22. package/dist/locale.js.map +1 -1
  23. package/dist/muse-usage-relay.d.ts +72 -0
  24. package/dist/muse-usage-relay.js +431 -0
  25. package/dist/muse-usage-relay.js.map +1 -0
  26. package/dist/tmux-manager.d.ts +2 -0
  27. package/dist/tmux-manager.js +20 -0
  28. package/dist/tmux-manager.js.map +1 -1
  29. package/dist/tool-permissions.d.ts +27 -0
  30. package/dist/tool-permissions.js +64 -3
  31. package/dist/tool-permissions.js.map +1 -1
  32. package/dist/topic-commands.d.ts +9 -0
  33. package/dist/topic-commands.js +36 -2
  34. package/dist/topic-commands.js.map +1 -1
  35. package/dist/ui/view.html +2 -2
  36. package/dist/usage/i18n-keys.d.ts +1 -1
  37. package/dist/usage/i18n-keys.js +1 -1
  38. package/dist/usage/i18n-keys.js.map +1 -1
  39. package/dist/usage/providers.d.ts +4 -0
  40. package/dist/usage/providers.js +86 -9
  41. package/dist/usage/providers.js.map +1 -1
  42. package/dist/usage/usage-api.d.ts +0 -11
  43. package/dist/usage/usage-api.js +50 -8
  44. package/dist/usage/usage-api.js.map +1 -1
  45. package/package.json +2 -1
@@ -7,7 +7,35 @@ export declare class CodexBackend implements CliBackend {
7
7
  private readonly isolatedCodexHome;
8
8
  /** Which subscription this instance runs on, or null for the shared login. */
9
9
  private credentialProfile;
10
+ /** Set only after preTrust wrote and read back this instance's private config. */
11
+ private authorizedTrust;
10
12
  constructor(instanceDir: string);
13
+ /**
14
+ * Compute and (on first call for an existing instance) migrate to a SHORT
15
+ * persistent CODEX_HOME under `~/.agend/cx/<8-char-hash>/`.
16
+ *
17
+ * Background (#953): codex 0.157.0 added `app-server-control.sock` under
18
+ * CODEX_HOME. For instances with long `-t<topic_id>` suffixes the full path
19
+ * exceeds the Unix socket SUN_LEN (~107 chars). codex canonicalises the path
20
+ * before binding the socket, so a symlink workaround does not help — the real
21
+ * path must be short.
22
+ *
23
+ * Migration steps (each is idempotent; half-completed states self-heal):
24
+ * 1. If shortHome does not exist AND legacyHome is a real directory (not a
25
+ * symlink) → atomic renameSync. On EXDEV or any other error, fall back
26
+ * safely: keep using the legacy long path (instance can still start, just
27
+ * without the short-path fix).
28
+ * 2. If shortHome exists but legacyHome is missing → recreate the backward-
29
+ * compat symlink (self-heal for rename-succeeded-but-symlink-failed crash).
30
+ * 3. If both shortHome and legacyHome (as symlink) exist → nothing to do.
31
+ * 4. New instance (no legacyHome) → create shortHome directly.
32
+ *
33
+ * Fail-safe guarantee: migration failure must never make the instance worse.
34
+ * The caller always receives a valid path it can use as CODEX_HOME.
35
+ */
36
+ /** Exposed for fleet-manager to delete the short home on instance removal. */
37
+ static shortHomeFor(instanceDir: string): string;
38
+ private static resolveShortHome;
11
39
  supportsQueuedInput(): boolean;
12
40
  /**
13
41
  * Codex's input row, from live captures on codex-cli 0.153.4: `› Ask Codex to
@@ -26,6 +54,8 @@ export declare class CodexBackend implements CliBackend {
26
54
  * (updatePickerDialog) before any delivery path reads this pattern.
27
55
  */
28
56
  getBottomReadyPattern(): RegExp | null;
57
+ /** Observed on real Codex 0.156.0: the live input row precedes its footer. */
58
+ isDeliveryInputReadyPane(pane: string): boolean;
29
59
  /** Live status chrome that must veto the broad prompt/context ready match. */
30
60
  getBusyPattern(): RegExp;
31
61
  /**
@@ -127,9 +157,14 @@ export declare class CodexBackend implements CliBackend {
127
157
  */
128
158
  private cleanSharedConfig;
129
159
  getReadyPattern(): RegExp;
160
+ /** A proxy reply filters chrome per line; whole-pane readiness is separate. */
161
+ isProxyReplyChromeLine(line: string): boolean;
130
162
  getErrorPatterns(): ErrorPattern[];
131
163
  getStartupDialogs(): StartupDialog[];
164
+ private trustHoldDialog;
132
165
  private updatePickerDialog;
166
+ private usageLimitLunaReserveDialog;
167
+ private unknownSelectionHoldDialog;
133
168
  getRuntimeDialogs(): RuntimeDialog[];
134
169
  getInputUnavailableTransients(): InputUnavailableTransient[];
135
170
  getContextUsage(): number | null;
@@ -171,6 +206,23 @@ export declare class CodexBackend implements CliBackend {
171
206
  * fallback keeps `/model` usable before the first TUI catalog refresh.
172
207
  */
173
208
  listModels(): Promise<ModelOption[]>;
209
+ /**
210
+ * Make codex refetch its account catalog into models_cache.json.
211
+ *
212
+ * listModels() only reads that file; codex writes it. Measured on 0.156.0:
213
+ * `codex debug models` fetches the catalog when the cache is older than
214
+ * codex's own TTL (about five minutes — a 4-minute-old cache was served as
215
+ * is, a 6-minute-old one was refetched) and rewrites the file with a new
216
+ * `fetched_at`. `--bundled` would skip the fetch, so it is not passed.
217
+ *
218
+ * What this does NOT force: a cache codex fetched in the last ~5 minutes is
219
+ * trusted by codex and returned unchanged. There is no flag to bypass that,
220
+ * and a list at most five minutes old is not the staleness this exists for.
221
+ *
222
+ * Targets the same CODEX_HOME listModels() reads, so the refetch lands in the
223
+ * file that is read next.
224
+ */
225
+ refreshModelCatalog(): Promise<void>;
174
226
  probeCLIEnv(): Promise<{
175
227
  version?: string;
176
228
  models: ModelOption[];