@songsid/agend 2.3.2-beta.4 → 2.3.2-beta.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 (197) hide show
  1. package/THIRD_PARTY_NOTICES.md +40 -0
  2. package/dist/antigravity-usage-scan.d.ts +58 -0
  3. package/dist/antigravity-usage-scan.js +257 -0
  4. package/dist/antigravity-usage-scan.js.map +1 -0
  5. package/dist/antigravity-usage-worker.d.ts +1 -0
  6. package/dist/antigravity-usage-worker.js +10 -0
  7. package/dist/antigravity-usage-worker.js.map +1 -0
  8. package/dist/backend/kiro-identity.d.ts +45 -0
  9. package/dist/backend/kiro-identity.js +74 -0
  10. package/dist/backend/kiro-identity.js.map +1 -1
  11. package/dist/backend/kiro.d.ts +15 -0
  12. package/dist/backend/kiro.js +42 -5
  13. package/dist/backend/kiro.js.map +1 -1
  14. package/dist/backend/types.d.ts +6 -0
  15. package/dist/backend/types.js.map +1 -1
  16. package/dist/backend-signin-guide.d.ts +1 -0
  17. package/dist/backend-signin-guide.js +9 -0
  18. package/dist/backend-signin-guide.js.map +1 -0
  19. package/dist/backend-signin-pending.d.ts +10 -0
  20. package/dist/backend-signin-pending.js +44 -0
  21. package/dist/backend-signin-pending.js.map +1 -0
  22. package/dist/browser-backend-signins.d.ts +56 -0
  23. package/dist/browser-backend-signins.js +189 -0
  24. package/dist/browser-backend-signins.js.map +1 -0
  25. package/dist/cache-ledger.d.ts +38 -2
  26. package/dist/cache-ledger.js +133 -8
  27. package/dist/cache-ledger.js.map +1 -1
  28. package/dist/cache-prices.d.ts +2 -1
  29. package/dist/cache-prices.js +5 -2
  30. package/dist/cache-prices.js.map +1 -1
  31. package/dist/cache-service.d.ts +68 -0
  32. package/dist/cache-service.js +355 -13
  33. package/dist/cache-service.js.map +1 -1
  34. package/dist/channel/adapters/discord.d.ts +11 -0
  35. package/dist/channel/adapters/discord.js +50 -8
  36. package/dist/channel/adapters/discord.js.map +1 -1
  37. package/dist/channel/mcp-tools.js +3 -1
  38. package/dist/channel/mcp-tools.js.map +1 -1
  39. package/dist/cli.js +21 -2
  40. package/dist/cli.js.map +1 -1
  41. package/dist/config-validator.js +25 -3
  42. package/dist/config-validator.js.map +1 -1
  43. package/dist/config.d.ts +19 -0
  44. package/dist/config.js +25 -0
  45. package/dist/config.js.map +1 -1
  46. package/dist/cpu-quota.d.ts +23 -0
  47. package/dist/cpu-quota.js +86 -0
  48. package/dist/cpu-quota.js.map +1 -0
  49. package/dist/daemon.js +6 -3
  50. package/dist/daemon.js.map +1 -1
  51. package/dist/fleet-manager.d.ts +56 -5
  52. package/dist/fleet-manager.js +387 -144
  53. package/dist/fleet-manager.js.map +1 -1
  54. package/dist/general-knowledge/skills/credential-profiles/SKILL.md +5 -2
  55. package/dist/general-knowledge/skills/kiro-engine-migration/SKILL.md +14 -1
  56. package/dist/general-knowledge/skills/web-dashboard/SKILL.canvas-worker-off.md +20 -4
  57. package/dist/general-knowledge/skills/web-dashboard/SKILL.md +20 -4
  58. package/dist/instance-lifecycle.d.ts +9 -0
  59. package/dist/instance-lifecycle.js +27 -1
  60. package/dist/instance-lifecycle.js.map +1 -1
  61. package/dist/kiro-db-reader.d.ts +5 -0
  62. package/dist/kiro-db-reader.js +18 -0
  63. package/dist/kiro-db-reader.js.map +1 -1
  64. package/dist/kiro-engine-status.d.ts +2 -0
  65. package/dist/kiro-engine-status.js +9 -0
  66. package/dist/kiro-engine-status.js.map +1 -1
  67. package/dist/kiro-migrate.d.ts +49 -0
  68. package/dist/kiro-migrate.js +105 -0
  69. package/dist/kiro-migrate.js.map +1 -0
  70. package/dist/kiro-transcript-lane.d.ts +2 -0
  71. package/dist/kiro-transcript-lane.js.map +1 -1
  72. package/dist/kiro-transcript-worker.js +1 -0
  73. package/dist/kiro-transcript-worker.js.map +1 -1
  74. package/dist/kiro-usage-run.d.ts +7 -0
  75. package/dist/kiro-usage-run.js +39 -0
  76. package/dist/kiro-usage-run.js.map +1 -0
  77. package/dist/kiro-usage-scan.d.ts +49 -0
  78. package/dist/kiro-usage-scan.js +223 -0
  79. package/dist/kiro-usage-scan.js.map +1 -0
  80. package/dist/kiro-usage-worker.d.ts +1 -0
  81. package/dist/kiro-usage-worker.js +10 -0
  82. package/dist/kiro-usage-worker.js.map +1 -0
  83. package/dist/kiro-usage.d.ts +58 -0
  84. package/dist/kiro-usage.js +310 -0
  85. package/dist/kiro-usage.js.map +1 -0
  86. package/dist/locale.js +78 -2
  87. package/dist/locale.js.map +1 -1
  88. package/dist/log-service.js +1 -1
  89. package/dist/log-service.js.map +1 -1
  90. package/dist/login-url.d.ts +4 -0
  91. package/dist/login-url.js +22 -0
  92. package/dist/login-url.js.map +1 -0
  93. package/dist/needs-you-hub.d.ts +2 -1
  94. package/dist/needs-you-hub.js +1 -1
  95. package/dist/needs-you-hub.js.map +1 -1
  96. package/dist/needs-you.d.ts +8 -2
  97. package/dist/needs-you.js +6 -0
  98. package/dist/needs-you.js.map +1 -1
  99. package/dist/notice-delivery.d.ts +7 -6
  100. package/dist/notice-delivery.js +16 -18
  101. package/dist/notice-delivery.js.map +1 -1
  102. package/dist/office-share-page.d.ts +13 -0
  103. package/dist/office-share-page.js +82 -0
  104. package/dist/office-share-page.js.map +1 -0
  105. package/dist/office-share-service.d.ts +89 -0
  106. package/dist/office-share-service.js +172 -0
  107. package/dist/office-share-service.js.map +1 -0
  108. package/dist/office-share.d.ts +228 -0
  109. package/dist/office-share.js +489 -0
  110. package/dist/office-share.js.map +1 -0
  111. package/dist/opencode-usage-scan.d.ts +28 -0
  112. package/dist/opencode-usage-scan.js +92 -0
  113. package/dist/opencode-usage-scan.js.map +1 -0
  114. package/dist/opencode-usage-worker.d.ts +1 -0
  115. package/dist/opencode-usage-worker.js +10 -0
  116. package/dist/opencode-usage-worker.js.map +1 -0
  117. package/dist/outbound-handlers.js +22 -2
  118. package/dist/outbound-handlers.js.map +1 -1
  119. package/dist/outbound-schemas.d.ts +4 -0
  120. package/dist/outbound-schemas.js +4 -0
  121. package/dist/outbound-schemas.js.map +1 -1
  122. package/dist/public-web-gateway.js +6 -0
  123. package/dist/public-web-gateway.js.map +1 -1
  124. package/dist/quickstart-api.js +13 -2
  125. package/dist/quickstart-api.js.map +1 -1
  126. package/dist/quickstart.js +2 -3
  127. package/dist/quickstart.js.map +1 -1
  128. package/dist/settings-api.js +1 -1
  129. package/dist/settings-api.js.map +1 -1
  130. package/dist/setup-form.d.ts +1 -1
  131. package/dist/setup-form.js +7 -1
  132. package/dist/setup-form.js.map +1 -1
  133. package/dist/setup-host.d.ts +9 -0
  134. package/dist/setup-host.js +125 -7
  135. package/dist/setup-host.js.map +1 -1
  136. package/dist/setup-signin-assets.d.ts +2 -0
  137. package/dist/setup-signin-assets.js +6 -0
  138. package/dist/setup-signin-assets.js.map +1 -0
  139. package/dist/setup-wizard.js +2 -2
  140. package/dist/setup-wizard.js.map +1 -1
  141. package/dist/structured-signin-transport.d.ts +8 -0
  142. package/dist/structured-signin-transport.js +79 -0
  143. package/dist/structured-signin-transport.js.map +1 -0
  144. package/dist/structured-signin.d.ts +131 -0
  145. package/dist/structured-signin.js +388 -0
  146. package/dist/structured-signin.js.map +1 -0
  147. package/dist/tool-permissions.js +2 -0
  148. package/dist/tool-permissions.js.map +1 -1
  149. package/dist/topic-commands.js +4 -1
  150. package/dist/topic-commands.js.map +1 -1
  151. package/dist/transcript-sources.d.ts +26 -2
  152. package/dist/transcript-sources.js +87 -40
  153. package/dist/transcript-sources.js.map +1 -1
  154. package/dist/types.d.ts +15 -5
  155. package/dist/ui/backend-signin.js +63 -10
  156. package/dist/ui/fleet-office-pack.js +7 -2
  157. package/dist/ui/fleet-office-skin.js +5 -4
  158. package/dist/ui/fleet-office-zones.js +17 -6
  159. package/dist/ui/fleet-office.js +20 -10
  160. package/dist/ui/fleet-usage.js +19 -15
  161. package/dist/ui/office-share-dialog.js +145 -0
  162. package/dist/ui/office-share-page.js +116 -0
  163. package/dist/ui/panel-log.js +2 -2
  164. package/dist/ui/panel-needs.js +4 -4
  165. package/dist/ui/panel-settings.js +12 -8
  166. package/dist/ui/settings-registry.js +2 -2
  167. package/dist/ui/settings-strings.js +6 -6
  168. package/dist/ui/shared/app-i18n.js +2 -2
  169. package/dist/ui/shared/app.css +29 -0
  170. package/dist/ui/structured-signin.js +115 -0
  171. package/dist/usage-report.d.ts +20 -0
  172. package/dist/usage-report.js +54 -17
  173. package/dist/usage-report.js.map +1 -1
  174. package/dist/usage-rollup.d.ts +9 -1
  175. package/dist/usage-rollup.js +20 -4
  176. package/dist/usage-rollup.js.map +1 -1
  177. package/dist/web-api.d.ts +15 -0
  178. package/dist/web-api.js +190 -0
  179. package/dist/web-api.js.map +1 -1
  180. package/dist/web-auth.js +1 -1
  181. package/dist/web-auth.js.map +1 -1
  182. package/dist/web-backend-login.d.ts +1 -7
  183. package/dist/web-backend-login.js +2 -24
  184. package/dist/web-backend-login.js.map +1 -1
  185. package/dist/web-office-skins.d.ts +2 -1
  186. package/dist/web-office-skins.js +2 -1
  187. package/dist/web-office-skins.js.map +1 -1
  188. package/dist/web-settings-patch.js +1 -1
  189. package/dist/web-settings-patch.js.map +1 -1
  190. package/dist/working-recovery.d.ts +2 -2
  191. package/dist/working-recovery.js +43 -8
  192. package/dist/working-recovery.js.map +1 -1
  193. package/dist/working-state-journal.d.ts +2 -0
  194. package/dist/working-state-journal.js +16 -1
  195. package/dist/working-state-journal.js.map +1 -1
  196. package/package.json +2 -1
  197. package/templates/windows-shortcuts.ps1 +7 -5
@@ -0,0 +1,228 @@
1
+ import { createServer, type Server } from "node:http";
2
+ import { type OfficeAct } from "./web-office-acts.js";
3
+ import type { Office } from "./web-office-store.js";
4
+ export declare const OFFICE_SHARE_LIMITS: {
5
+ /** Shares open at once, fleet-wide. */
6
+ readonly links: 10;
7
+ /** Lifetime: 1 h unless asked, 15 min to `web.office_share.max_hours` (24 at most). */
8
+ readonly defaultMinutes: 60;
9
+ readonly minMinutes: 15;
10
+ readonly maxHours: 24;
11
+ /** Per share, a sliding minute: requests, and bytes answered. */
12
+ readonly requestsPerMinute: 120;
13
+ readonly bytesPerMinute: number;
14
+ /** The page's static files (its code, the same for every share), all shares together. */
15
+ readonly staticRequestsPerMinute: 1200;
16
+ readonly staticBytesPerMinute: number;
17
+ };
18
+ /** "All offices": every stored office (and whoever is in none); otherwise a stored office's id. */
19
+ export declare const ALL_OFFICES = "all";
20
+ /**
21
+ * An office's members after the share's cut, when every one it named is out of the share: a team no chart has (a team's
22
+ * name has no control character), so the page finds nobody — never [], which the page reads as everyone.
23
+ */
24
+ export declare const NOBODY = "team:\0";
25
+ /** An ended (or unknown) share's page: the same words whichever it is. */
26
+ export declare const ENDED_PAGE: string;
27
+ export interface OfficeShare {
28
+ /** A short handle for lists and revoking (never the token). */
29
+ id: string;
30
+ /** ALL_OFFICES, or a stored office's id. */
31
+ office: string;
32
+ /** Agents' own lines (office_set `say`) are shown. */
33
+ text: boolean;
34
+ /** Who made it (for the list and General's announcement). */
35
+ owner: string;
36
+ /** Wall-clock ms, for display; the expiry itself runs on the monotonic clock. */
37
+ createdAt: number;
38
+ expiresAt: number;
39
+ }
40
+ export type OfficeShareCreate = {
41
+ ok: true;
42
+ share: OfficeShare;
43
+ token: string;
44
+ } | {
45
+ ok: false;
46
+ error: "too_many" | "duration" | "office";
47
+ };
48
+ export declare const hashShareToken: (token: string) => string;
49
+ /** The longest a share may live, in minutes: `web.office_share.max_hours` (whole hours, 1–24), 24 by default. */
50
+ export declare function shareMaxMinutes(maxHours: unknown): number;
51
+ /**
52
+ * The open shares. Each ends at its deadline (monotonic; a timer tells `changed` then, and find() refuses it from that
53
+ * moment whatever the timer did), when revoked, or when its owner is no longer allowed (endWhere). `changed` hears every
54
+ * change with the list as it is now — the tunnel follows it (none left: stop).
55
+ */
56
+ export declare class OfficeShares {
57
+ private readonly deps;
58
+ private readonly byHash;
59
+ private readonly now;
60
+ private readonly wall;
61
+ constructor(deps?: {
62
+ /** Monotonic ms (performance.now by default). */
63
+ now?(): number;
64
+ /** Wall-clock ms (Date.now by default): only what is shown. */
65
+ wall?(): number;
66
+ changed?(shares: OfficeShare[]): void;
67
+ random?(n: number): Buffer;
68
+ setTimer?(fn: () => void, ms: number): ReturnType<typeof setTimeout> | null;
69
+ clearTimer?(t: ReturnType<typeof setTimeout>): void;
70
+ });
71
+ /** A new share: `minutes` from 15 to `maxMinutes`; `office` ALL_OFFICES or an id `exists` knows. */
72
+ create(opts: {
73
+ office: string;
74
+ minutes?: number;
75
+ text?: boolean;
76
+ owner: string;
77
+ maxMinutes?: number;
78
+ exists?(office: string): boolean;
79
+ }): OfficeShareCreate;
80
+ /** The open share a token names, or null (unknown, malformed, ended). */
81
+ find(token: string): OfficeShare | null;
82
+ /** The open shares, soonest to end first. */
83
+ list(): OfficeShare[];
84
+ /** End one share by id, or every one (ALL_OFFICES is not an id: "all" ends all). Returns how many ended. */
85
+ revoke(id: string): number;
86
+ /** End every share `test` picks (an owner no longer a fleet admin, an office deleted, the feature turned off). */
87
+ endWhere(test: (share: OfficeShare) => boolean): number;
88
+ private drop;
89
+ private prune;
90
+ private announce;
91
+ }
92
+ /** Per key (a share's id): requests and bytes in a sliding minute (monotonic, memory only). */
93
+ export declare class OfficeShareLimiter {
94
+ private readonly now;
95
+ private readonly limits;
96
+ private readonly seen;
97
+ constructor(now?: () => number, limits?: {
98
+ requests: number;
99
+ bytes: number;
100
+ });
101
+ /** A request arrives: false when the key has had its requests or bytes this minute. */
102
+ admit(id: string): boolean;
103
+ /** What the admitted request answered, in bytes. */
104
+ sent(id: string, bytes: number): void;
105
+ forget(id: string): void;
106
+ private window;
107
+ }
108
+ /** Where a share's picture is read from: the fleet's own reads, as they are now. */
109
+ export interface OfficeShareSource {
110
+ /** The status frame (getUiStatus): its `instances`. */
111
+ status(): unknown;
112
+ /** The org chart (orgChart): `general` and `teams`. */
113
+ org(): {
114
+ general?: unknown;
115
+ teams?: unknown;
116
+ };
117
+ /** The stored offices (web-office-store.ts list()). */
118
+ offices(): {
119
+ rev: number;
120
+ offices: Office[];
121
+ };
122
+ /** The live acts (OfficeActs live()). */
123
+ acts(): OfficeAct[];
124
+ /** /ui/traffic's snapshot. */
125
+ traffic(): {
126
+ now: string;
127
+ items: unknown[];
128
+ delegations?: unknown[];
129
+ };
130
+ /** The instances "Needs you" names now (one entry per item). */
131
+ needs(): string[];
132
+ /** cross_instance_visibility "hidden" now. */
133
+ hidden(name: string): boolean;
134
+ /** The skin packs the host keeps (web-office-skins.ts). */
135
+ skins?: {
136
+ list(): {
137
+ packs: Array<{
138
+ id: string;
139
+ }>;
140
+ } & Record<string, unknown>;
141
+ get(id: string): unknown;
142
+ picture(id: string, sha: string): Buffer | null;
143
+ };
144
+ }
145
+ /**
146
+ * One share's picture, read once from `src`: who is in it (`scope`), and each read the page makes, cut to them.
147
+ * `offices`: the shared office, or every stored office; `null` when the shared office is gone (the share then shows
148
+ * nothing and its owner is told it ended).
149
+ */
150
+ export declare class OfficeShareView {
151
+ private readonly share;
152
+ private readonly src;
153
+ readonly offices: Office[] | null;
154
+ readonly scope: ReadonlySet<string>;
155
+ private readonly people;
156
+ /** fleet.yaml's teams with someone shown, each with only its shown members. */
157
+ private readonly teams;
158
+ constructor(share: Pick<OfficeShare, "office" | "text"> & Partial<Pick<OfficeShare, "expiresAt">>, src: OfficeShareSource);
159
+ /** The status frame as the page's app store takes it, and the chart's structure (no descriptions, threads or info). */
160
+ state(): Record<string, unknown>;
161
+ /**
162
+ * /ui/offices's answer, the shared office (or all) only, each cut to the share (#2637 review): its members only those
163
+ * shown (an instance, or a team with someone shown; NOBODY when none is), and a seat kept for someone not shown keeps
164
+ * its place but not the name. The stored offices are never changed.
165
+ */
166
+ officeList(): {
167
+ rev: number;
168
+ offices: Office[];
169
+ readable: boolean;
170
+ };
171
+ /** /ui/office-acts's answer: the acts of the people shown, in a shown office, without their line unless shared. */
172
+ acts(): {
173
+ acts: OfficeAct[];
174
+ now: number;
175
+ };
176
+ /**
177
+ * A pack's answer as this share gets it (#2637 review): its manifest's instance names cut to the share — `byInstance`
178
+ * only for people shown, a furniture item's `activeFor` only them (none left: [], which watches nobody, never the
179
+ * missing key, which watches everyone). A copy: the kept pack is never changed.
180
+ */
181
+ pack(answer: unknown): unknown;
182
+ /** The packs the shown offices are drawn in (a pack no shown office names is not offered). */
183
+ skinIds(): Set<string>;
184
+ }
185
+ export interface OfficeShareGateway {
186
+ readonly server: Server;
187
+ readonly readinessMarker: string;
188
+ listen(): Promise<URL>;
189
+ setHost(host: string | null): void;
190
+ close(): void;
191
+ }
192
+ /**
193
+ * The share tunnel's gateway. GET and HEAD only, on this tunnel's own Host; `/ready` for the tunnel's probe; then
194
+ * `/o/<token>` and its reads, for an open share within its limits:
195
+ *
196
+ * /o/<t> the page (`page`; 404 while there is none)
197
+ * /o/<t>/state OfficeShareView.state()
198
+ * /o/<t>/offices OfficeShareView.officeList()
199
+ * /o/<t>/office-acts OfficeShareView.acts()
200
+ * /o/<t>/office-skins the packs the shown offices use
201
+ * /o/<t>/office-skins/<id> one of them, its instance names cut to the share (never cached)
202
+ * /o/<t>/office-skins/<id>/img/<sha>.png its picture (immutable)
203
+ *
204
+ * and, with no token, the page's static files at the dashboard's own paths (`statics`: `/assets/<name>`, `/ui/js/<name>`;
205
+ * office-share-page.ts names them), limited together (OFFICE_SHARE_LIMITS.static*).
206
+ *
207
+ * Anything else, an unknown or ended token, an office since deleted: an empty 404 (no word on why: a stranger learns
208
+ * nothing). Over the limit: 429. The share is asked again before each answer is sent. No cookie is read or set and
209
+ * nothing is logged per request.
210
+ */
211
+ export declare function createOfficeShareGateway(opts: {
212
+ shares: Pick<OfficeShares, "find">;
213
+ source: OfficeShareSource;
214
+ limiter?: OfficeShareLimiter;
215
+ /** The page for a share (HTML), or null while there is none. */
216
+ page?(share: OfficeShare, token: string): {
217
+ body: string;
218
+ csp: string;
219
+ } | null;
220
+ /** A static file of the page by its path (`/assets/…`, `/ui/js/…`), or null. */
221
+ statics?(path: string): {
222
+ body: Buffer;
223
+ type: string;
224
+ } | null;
225
+ staticLimiter?: OfficeShareLimiter;
226
+ create?: typeof createServer;
227
+ marker?: string;
228
+ }): OfficeShareGateway;