@songsid/agend 2.4.0-beta.22 → 2.4.0-beta.23

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 (172) hide show
  1. package/dist/agent-whats-new.js +6 -0
  2. package/dist/agent-whats-new.js.map +1 -1
  3. package/dist/auth-api.d.ts +2 -0
  4. package/dist/auth-api.js +5 -2
  5. package/dist/auth-api.js.map +1 -1
  6. package/dist/authority/web-authority.d.ts +17 -3
  7. package/dist/authority/web-authority.js +56 -3
  8. package/dist/authority/web-authority.js.map +1 -1
  9. package/dist/build-provenance.json +1 -1
  10. package/dist/channel/mcp-tools.js +8 -1
  11. package/dist/channel/mcp-tools.js.map +1 -1
  12. package/dist/classic-channel-manager.d.ts +1 -1
  13. package/dist/classic-channel-manager.js +2 -2
  14. package/dist/classic-channel-manager.js.map +1 -1
  15. package/dist/contact-auth-api.js +3 -1
  16. package/dist/contact-auth-api.js.map +1 -1
  17. package/dist/contact-auth-service.js +1 -1
  18. package/dist/contact-auth-service.js.map +1 -1
  19. package/dist/contact-auth-store.d.ts +28 -2
  20. package/dist/contact-auth-store.js +72 -4
  21. package/dist/contact-auth-store.js.map +1 -1
  22. package/dist/contact-change-proposals.d.ts +18 -1
  23. package/dist/contact-change-proposals.js +38 -4
  24. package/dist/contact-change-proposals.js.map +1 -1
  25. package/dist/contact-state-view.d.ts +103 -0
  26. package/dist/contact-state-view.js +80 -0
  27. package/dist/contact-state-view.js.map +1 -0
  28. package/dist/fleet-manager.d.ts +143 -15
  29. package/dist/fleet-manager.js +455 -78
  30. package/dist/fleet-manager.js.map +1 -1
  31. package/dist/general-knowledge/skills/admin/SKILL.md +52 -0
  32. package/dist/general-knowledge/skills/concepts/SKILL.md +14 -17
  33. package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +6 -3
  34. package/dist/general-knowledge/skills/hub/SKILL.md +6 -1
  35. package/dist/general-knowledge/skills/web-dashboard/SKILL.md +54 -9
  36. package/dist/general-knowledge/skills/worker-collaboration/SKILL.md +1 -1
  37. package/dist/general-role.d.ts +1 -1
  38. package/dist/general-role.js +1 -0
  39. package/dist/general-role.js.map +1 -1
  40. package/dist/hub/client.js +6 -1
  41. package/dist/hub/client.js.map +1 -1
  42. package/dist/hub/compose/member.d.ts +2 -1
  43. package/dist/hub/compose/member.js +3 -2
  44. package/dist/hub/compose/member.js.map +1 -1
  45. package/dist/hub/compose/server.js +2 -1
  46. package/dist/hub/compose/server.js.map +1 -1
  47. package/dist/hub/group-policy/resources.d.ts +1 -1
  48. package/dist/hub/http/compose.js +5 -0
  49. package/dist/hub/http/compose.js.map +1 -1
  50. package/dist/hub/protocol.d.ts +21 -0
  51. package/dist/hub/protocol.js +3 -0
  52. package/dist/hub/protocol.js.map +1 -1
  53. package/dist/hub/question-close-model.d.ts +17 -0
  54. package/dist/hub/question-close-model.js +7 -0
  55. package/dist/hub/question-close-model.js.map +1 -0
  56. package/dist/hub/representative.d.ts +5 -0
  57. package/dist/hub/representative.js +51 -1
  58. package/dist/hub/representative.js.map +1 -1
  59. package/dist/hub/rooms/direct-view.js +1 -0
  60. package/dist/hub/rooms/direct-view.js.map +1 -1
  61. package/dist/hub/rooms/types.d.ts +1 -1
  62. package/dist/hub/rooms.d.ts +3 -0
  63. package/dist/hub/rooms.js +27 -1
  64. package/dist/hub/rooms.js.map +1 -1
  65. package/dist/hub/server.js +6 -1
  66. package/dist/hub/server.js.map +1 -1
  67. package/dist/hub/types.d.ts +2 -2
  68. package/dist/human-delivery-receipts.d.ts +12 -2
  69. package/dist/human-delivery-receipts.js +19 -4
  70. package/dist/human-delivery-receipts.js.map +1 -1
  71. package/dist/instructions.d.ts +1 -1
  72. package/dist/instructions.js +1 -1
  73. package/dist/instructions.js.map +1 -1
  74. package/dist/locale.js +100 -12
  75. package/dist/locale.js.map +1 -1
  76. package/dist/needs-you.d.ts +2 -0
  77. package/dist/needs-you.js +2 -1
  78. package/dist/needs-you.js.map +1 -1
  79. package/dist/office-share-page.js +1 -1
  80. package/dist/office-share-page.js.map +1 -1
  81. package/dist/outbound-handlers.d.ts +4 -0
  82. package/dist/outbound-handlers.js +40 -5
  83. package/dist/outbound-handlers.js.map +1 -1
  84. package/dist/outbound-schemas.d.ts +2 -1
  85. package/dist/outbound-schemas.js +3 -2
  86. package/dist/outbound-schemas.js.map +1 -1
  87. package/dist/public-web-gateway.js +18 -0
  88. package/dist/public-web-gateway.js.map +1 -1
  89. package/dist/reply-buttons-controller.d.ts +2 -1
  90. package/dist/reply-buttons-controller.js +1 -1
  91. package/dist/reply-buttons-controller.js.map +1 -1
  92. package/dist/tool-permissions.js +1 -1
  93. package/dist/tool-permissions.js.map +1 -1
  94. package/dist/ui/accounts-keepalive.js +2 -1
  95. package/dist/ui/chat-activity.js +2 -1
  96. package/dist/ui/chat-pins.js +2 -1
  97. package/dist/ui/claude-credentials.js +2 -1
  98. package/dist/ui/contact-auth-strings.js +28 -17
  99. package/dist/ui/contact-authorizations.js +6 -4
  100. package/dist/ui/contact-needs.js +6 -1
  101. package/dist/ui/contact-permissions.js +6 -4
  102. package/dist/ui/contact-tool-groups.js +1 -1
  103. package/dist/ui/contact-verify-need.js +46 -0
  104. package/dist/ui/fleet-cache.js +2 -1
  105. package/dist/ui/fleet-office-skin.js +10 -6
  106. package/dist/ui/fleet-office-zones.js +22 -9
  107. package/dist/ui/fleet-office.js +16 -9
  108. package/dist/ui/fleet-org.js +6 -1
  109. package/dist/ui/fleet-tab-icons.js +19 -0
  110. package/dist/ui/fleet-task-activity.js +2 -1
  111. package/dist/ui/fleet-task-view.js +2 -1
  112. package/dist/ui/fleet-usage.js +2 -1
  113. package/dist/ui/hub-admin-overview.js +2 -1
  114. package/dist/ui/hub-agent-intro.js +2 -1
  115. package/dist/ui/hub-assistant-admin.js +2 -1
  116. package/dist/ui/hub-directory-notices.js +2 -1
  117. package/dist/ui/hub-enrolment-code.js +2 -1
  118. package/dist/ui/hub-my-agents.js +2 -1
  119. package/dist/ui/hub-quick-pairing.js +2 -1
  120. package/dist/ui/hub-role-audit.js +2 -1
  121. package/dist/ui/hub-role-forms.js +3 -2
  122. package/dist/ui/hub-role-view.js +3 -2
  123. package/dist/ui/hub-roles.js +2 -1
  124. package/dist/ui/hub-room-agent-strings.js +2 -1
  125. package/dist/ui/hub-room-list.js +2 -1
  126. package/dist/ui/hub-room-owner-requests.js +2 -1
  127. package/dist/ui/hub-room-pins.js +2 -1
  128. package/dist/ui/hub-room-strings.js +2 -2
  129. package/dist/ui/hub-room-thread.js +1 -1
  130. package/dist/ui/log-row.js +4 -3
  131. package/dist/ui/office-share-dialog.js +2 -1
  132. package/dist/ui/office-share-page.js +2 -1
  133. package/dist/ui/page-share-dialog.js +3 -2
  134. package/dist/ui/panel-chat.js +2 -1
  135. package/dist/ui/panel-details.js +2 -1
  136. package/dist/ui/panel-fleet.js +10 -5
  137. package/dist/ui/panel-hub.js +2 -1
  138. package/dist/ui/panel-needs.js +31 -3
  139. package/dist/ui/panel-notices.js +2 -1
  140. package/dist/ui/panel-runtimes.js +2 -1
  141. package/dist/ui/panel-windows-cli.js +3 -2
  142. package/dist/ui/runtime-cli-install.js +2 -1
  143. package/dist/ui/settings-appearance.js +2 -1
  144. package/dist/ui/settings-guests.js +4 -3
  145. package/dist/ui/settings-hub-member-address.js +2 -1
  146. package/dist/ui/settings-hub-setup.js +2 -1
  147. package/dist/ui/settings-hub-web-address.js +2 -1
  148. package/dist/ui/settings-hub.js +2 -1
  149. package/dist/ui/settings-update.js +2 -1
  150. package/dist/ui/settings-web-authority.js +2 -1
  151. package/dist/ui/shared/agent-sheet.js +2 -1
  152. package/dist/ui/shared/app-session.js +4 -3
  153. package/dist/ui/shared/app-shell.js +6 -2
  154. package/dist/ui/shared/app.css +38 -8
  155. package/dist/ui/shared/chat-time.js +7 -4
  156. package/dist/ui/shared/clock-text.js +57 -0
  157. package/dist/ui/shared/device-roles.js +6 -5
  158. package/dist/ui/shared/instance-nav.js +17 -22
  159. package/dist/ui/shared/usage-dialog.js +2 -1
  160. package/dist/ui/shared/view-strings.js +0 -14
  161. package/dist/ui/shared/web-authorize.js +3 -2
  162. package/dist/ui/subagent-row.js +2 -1
  163. package/dist/web-api.d.ts +15 -2
  164. package/dist/web-api.js +62 -13
  165. package/dist/web-api.js.map +1 -1
  166. package/dist/web-login.d.ts +6 -1
  167. package/dist/web-login.js +8 -3
  168. package/dist/web-login.js.map +1 -1
  169. package/dist/web-session-authorization.d.ts +3 -0
  170. package/dist/web-session-authorization.js +1 -1
  171. package/dist/web-session-authorization.js.map +1 -1
  172. package/package.json +1 -1
@@ -27,19 +27,53 @@ export const ProposeContactChangeArgs = z.strictObject({ change: z.strictObject(
27
27
  for (const issue of parsed.error.issues)
28
28
  ctx.addIssue({ code: "custom", path: issue.path, message: issue.message });
29
29
  }) });
30
+ /** M-3693: contact_state's arguments — read-only; `agent` narrows to what involves that agent or room. */
31
+ export const ContactStateArgs = z.strictObject({ agent: z.string().min(1).max(160).optional() });
32
+ /** The short id people see — the same rule as the web's shortTicketId (src/ui/contact-auth-client.js): R + 8 hex. */
33
+ export const shortContactTicketId = (id) => /^R[a-f0-9]{8}-[a-f0-9-]{27}$/.test(id) ? id.slice(0, 9) : id;
34
+ /**
35
+ * M-3693: the held message a person names. People see a 9-character short id (cards, notices, contact_state); the
36
+ * full id still works. A prefix of at least 9 characters resolves to the one pending ticket starting with it; none or
37
+ * several are refused, never guessed.
38
+ */
39
+ export function resolvePendingTicket(store, id) {
40
+ const exact = store.get(id);
41
+ if (exact) {
42
+ if (exact.state !== "pending")
43
+ throw Error("contact-proposal-ticket-unavailable");
44
+ return exact;
45
+ }
46
+ if (id.length < 9)
47
+ throw Error("contact-proposal-ticket-unavailable");
48
+ // One query over every pending ticket (Prism #4436 P2-1: no page limit can hide a second match).
49
+ const found = store.pendingByPrefix(id);
50
+ if (found.length > 1)
51
+ throw Error("contact-proposal-ticket-ambiguous");
52
+ if (!found.length)
53
+ throw Error("contact-proposal-ticket-unavailable");
54
+ return found[0]; // live: the query leaves out a ticket past its expiry; the card re-checks it before Confirm
55
+ }
56
+ const REFUSAL_CODES = new Set(["general-only", "hub-contact-restricted", "contact-proposal-limit", "contact-proposal-ticket-unavailable",
57
+ "contact-proposal-ticket-ambiguous", "conflict", "stale-generation", "invalid-grant-origin", "contact-proposal-not-room", "not-found",
58
+ "invalid-grant", "forbidden", "contact-proposal-use-web", "contact-proposal-route-unavailable"]);
59
+ /** M-3693: a refusal General can act on — a sentence with the next step, never a bare code. */
60
+ export function contactProposalRefusal(error) {
61
+ if (error instanceof z.ZodError)
62
+ return t("contactProposal.err_invalid", error.issues.map(i => `${i.path.join(".") || "change"}: ${i.message}`).join("; "));
63
+ const code = error instanceof Error ? error.message : String(error);
64
+ return REFUSAL_CODES.has(code) ? t(`contactProposal.err_${code}`) : t("contactProposal.err_other", code);
65
+ }
30
66
  /** Snapshots are daemon-owned and cloned; no identity or confirmation flag is accepted from the tool. */
31
67
  export function prepareContactChange(raw, host) {
32
68
  const input = ContactChangeSchema.parse(raw), store = host.service.host.store;
33
- const ticket = input.kind === "ticket-decision" ? store.get(input.ticket_id) : undefined;
34
- if (input.kind === "ticket-decision" && (!ticket || ticket.state !== "pending"))
35
- throw Error("contact-proposal-ticket-unavailable");
69
+ const ticket = input.kind === "ticket-decision" ? resolvePendingTicket(store, input.ticket_id) : undefined;
36
70
  const target = input.kind === "ticket-decision" ? ticket.target : input.target;
37
71
  const targetGeneration = host.generation(target), policy = structuredClone(store.policy(target, targetGeneration));
38
72
  const pins = new Map([[target, targetGeneration]]);
39
73
  const mode = host.mode(target);
40
74
  let payload;
41
75
  const label = (name) => host.label?.(name) || name;
42
- const shortId = (id) => id.slice(0, 9);
76
+ const shortId = shortContactTicketId;
43
77
  // A Latin-ending name gets a space before following Chinese prose; punctuation does not.
44
78
  const beforeCjk = (value) => getLocale() === "zh-TW" && /[\p{Script=Latin}\p{Number}]$/u.test(value) ? value + " " : value;
45
79
  const timeZone = host.timeZone?.() || Intl.DateTimeFormat().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IAC7F,MAAM,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,KAAK,iBAAiB,IAAI,KAAK,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,iCAAiC,CAAC,CAAC,CAAC,iCAAiC,EAAE,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QACtL,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,KAAK,cAAc,CAAC,CAAC,CAAC,8BAA8B,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,KAAK,cAAc,CAAC,CAAC,CAAC,6BAA6B,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC;IAClK,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,CAAC,MAAM;YAClE,IAAI,CAAC,OAAO,EAAE;gBAAE,MAAM,KAAK,CAAC,UAAU,CAAC,CAAC;YACxC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC;gBAAE,MAAM,KAAK,CAAC,WAAW,CAAC,CAAC;YAClD,IAAI,MAAM;gBAAE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,eAAe,CAAC,MAAM,CAA0B,EAAE,MAAM,CAAC,CAAC;;gBACxF,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,eAAe,CAAC,MAAM,CAA4B,EAAE,MAAM,CAAC,CAAC;QACtF,CAAC,EAAE,CAAC;AACN,CAAC"}
@@ -0,0 +1,103 @@
1
+ /**
2
+ * M-3693: what General can read about contact permissions, so it can answer "what is held, and who must decide?" and
3
+ * find the ids propose_contact_change needs. Read-only: every call below is a plain read (store.policy without a
4
+ * generation never writes). A held message's text is not included; only its approvers may see that.
5
+ */
6
+ import type { ContactStoredPolicy } from "./contact-auth-store.js";
7
+ import type { ContactOrigin, ContactTicket } from "./contact-auth-types.js";
8
+ export interface ContactStateHost {
9
+ store: {
10
+ /** No write (Prism #4436 P2-2): the ordinary list marks expired tickets and bumps their revision. */
11
+ pendingSnapshot(limit?: number): {
12
+ items: ContactTicket[];
13
+ truncated: boolean;
14
+ };
15
+ policy(instance: string): ContactStoredPolicy;
16
+ origin(instance: string): ContactOrigin | undefined;
17
+ };
18
+ /** Every agent and ClassicBot room this fleet knows. */
19
+ names(): string[];
20
+ label(name: string): string;
21
+ /** A ClassicBot room's mode (restricted, or stored as "legacy": unrestricted); undefined for an agent. */
22
+ roomMode(name: string): "restricted" | "legacy" | undefined;
23
+ /** The agent's current incarnation: a rule or ticket for an earlier one no longer applies. */
24
+ generation(name: string): string;
25
+ now(): number;
26
+ }
27
+ export declare function contactStateView(host: ContactStateHost, filter?: {
28
+ agent?: string;
29
+ }): {
30
+ held: Record<string, unknown>[];
31
+ held_truncated?: string | undefined;
32
+ grants: {
33
+ grant_id: string;
34
+ target: string;
35
+ revision: number;
36
+ person: string;
37
+ from: string;
38
+ verbs: import("./contact-auth-types.js").ContactVerb[];
39
+ expires_at: string;
40
+ remaining_uses: number | null;
41
+ current: boolean;
42
+ }[];
43
+ rooms: {
44
+ room: string;
45
+ mode: string;
46
+ stored_as: "legacy" | "restricted";
47
+ revision: number;
48
+ }[];
49
+ retained_origins: {
50
+ agent: string;
51
+ kind: "mixed" | "unknown";
52
+ people: string[];
53
+ chain: string[];
54
+ }[];
55
+ how_to: string[];
56
+ };
57
+ /**
58
+ * M-3716 (the user, 11-25): what one agent may read about the requests IT sent that were held — never anyone else's,
59
+ * and never the people or message text (its own context already has those). `delivery` reads the outbox row of an
60
+ * approved request, so "approved" becomes "delivered" or "not confirmed" as the target's copy settles.
61
+ */
62
+ export declare function ownContactRequestsView(tickets: ContactTicket[], host: {
63
+ label(name: string): string;
64
+ delivery(ticket: ContactTicket): string | undefined;
65
+ }): {
66
+ requests: ({
67
+ short_id: string;
68
+ ticket_id: string;
69
+ to: string;
70
+ verb: import("./contact-auth-types.js").ContactVerb;
71
+ state: string;
72
+ asked_at: string;
73
+ decided_at?: string | undefined;
74
+ approved_by_rule: boolean;
75
+ expires_at?: string | undefined;
76
+ delivery_id?: string | undefined;
77
+ next: string;
78
+ } | {
79
+ short_id: string;
80
+ ticket_id: string;
81
+ to: string;
82
+ verb: import("./contact-auth-types.js").ContactVerb;
83
+ state: string;
84
+ asked_at: string;
85
+ decided_at?: string | undefined;
86
+ decided_by: string | undefined;
87
+ expires_at?: string | undefined;
88
+ delivery_id?: string | undefined;
89
+ next: string;
90
+ } | {
91
+ short_id: string;
92
+ ticket_id: string;
93
+ to: string;
94
+ verb: import("./contact-auth-types.js").ContactVerb;
95
+ state: string;
96
+ asked_at: string;
97
+ decided_at?: string | undefined;
98
+ expires_at?: string | undefined;
99
+ delivery_id?: string | undefined;
100
+ next: string;
101
+ })[];
102
+ note?: string | undefined;
103
+ };
@@ -0,0 +1,80 @@
1
+ import { shortContactTicketId } from "./contact-change-proposals.js";
2
+ import { CONTACT_DELIVERY_IN_FLIGHT } from "./contact-auth-store.js";
3
+ const person = (p) => `${p.label} (${p.platform === "discord" ? "Discord" : p.platform === "telegram" ? "Telegram" : "this computer"})`;
4
+ export function contactStateView(host, filter = {}) {
5
+ const involves = (...names) => !filter.agent || names.includes(filter.agent);
6
+ const label = (name) => { const shown = host.label(name); return shown && shown !== name ? `${shown} (${name})` : name; };
7
+ const names = host.names().filter(n => involves(n));
8
+ const held = [];
9
+ const snapshot = host.store.pendingSnapshot();
10
+ {
11
+ for (const t of snapshot.items) {
12
+ if (t.state !== "pending" || Date.parse(t.expiresAt) <= host.now() || !involves(t.source, t.target))
13
+ continue;
14
+ const approvers = host.store.policy(t.target).approvers ?? [];
15
+ held.push({
16
+ ticket_id: t.id, short_id: shortContactTicketId(t.id), from: label(t.source), to: label(t.target), verb: t.verb,
17
+ origin: { kind: t.origin.kind, people: t.origin.people.map(person) },
18
+ decides: approvers.length ? approvers.map(person) : [host.roomMode(t.target) ? "an admin of the room" : "a fleet admin"],
19
+ expires_at: t.expiresAt, revision: t.revision,
20
+ current: t.targetGeneration === host.generation(t.target) && t.sourceGeneration === host.generation(t.source),
21
+ });
22
+ }
23
+ }
24
+ const grants = names.flatMap(target => {
25
+ const policy = host.store.policy(target), generation = host.generation(target);
26
+ return policy.grants.filter(g => Date.parse(g.expiresAt) > host.now()).map(g => ({
27
+ grant_id: g.id, target: label(target), revision: policy.revision, person: person(g.person), from: label(g.source),
28
+ verbs: g.verbs, expires_at: g.expiresAt, remaining_uses: g.remainingUses,
29
+ // The same exact bindings the proposal's matcher checks (Prism #4436 P2-3): both incarnations, none missing.
30
+ current: g.targetGeneration === generation && g.sourceGeneration === host.generation(g.source),
31
+ }));
32
+ });
33
+ const rooms = names.flatMap(name => {
34
+ const mode = host.roomMode(name);
35
+ return mode ? [{ room: label(name), mode: mode === "restricted" ? "restricted" : "unrestricted", stored_as: mode, revision: host.store.policy(name).revision }] : [];
36
+ });
37
+ // Only origins that restrict: an unknown or mixed origin holds the agent's messages for approval until it is cleared.
38
+ const retained_origins = names.flatMap(name => {
39
+ const origin = host.store.origin(name);
40
+ return origin && origin.kind !== "human" ? [{ agent: label(name), kind: origin.kind, people: origin.people.map(person), chain: origin.chain.map(label) }] : [];
41
+ });
42
+ return {
43
+ held, ...(snapshot.truncated ? { held_truncated: "More messages are held than listed; the admin sees all on Fleet › Authorizations." } : {}),
44
+ grants, rooms, retained_origins,
45
+ how_to: [
46
+ "Approve or decline a held message: propose_contact_change { kind: 'ticket-decision', ticket_id (the short_id works), decision }. An admin confirms the card.",
47
+ "Change or revoke a rule: propose_contact_change { kind: 'grant-adjust' | 'grant-revoke', target, grant_id }.",
48
+ "Switch a room: propose_contact_change { kind: 'mode', target, mode: 'restricted' | 'legacy' } ('legacy' is unrestricted).",
49
+ "A retained origin is cleared by an admin on the agent's Permissions tab in the web dashboard; General cannot propose it.",
50
+ ],
51
+ };
52
+ }
53
+ /**
54
+ * M-3716 (the user, 11-25): what one agent may read about the requests IT sent that were held — never anyone else's,
55
+ * and never the people or message text (its own context already has those). `delivery` reads the outbox row of an
56
+ * approved request, so "approved" becomes "delivered" or "not confirmed" as the target's copy settles.
57
+ */
58
+ export function ownContactRequestsView(tickets, host) {
59
+ const by = (p) => !p ? undefined : p.platform === "host" ? "host operator" : person(p);
60
+ const requests = tickets.map(t => {
61
+ // Prism #4452 P2-1/P2-2: an approved request's state is its real delivery row's — delivered, still in flight, or not
62
+ // confirmed (failed, uncertain, or a row that is missing or pruned). How it was approved is a separate field.
63
+ const delivery = t.state === "approved" ? host.delivery(t) : undefined;
64
+ const state = t.state !== "approved" ? t.state : delivery === "delivered" ? "delivered"
65
+ : CONTACT_DELIVERY_IN_FLIGHT.includes(delivery ?? "") ? "approved-queued" : "not-confirmed";
66
+ const next = state === "pending" ? "Waiting for an admin. Do not send it again; you get a notice when it is decided."
67
+ : state === "delivered" || state === "approved-queued" ? "The target has it or will get it. Wait for its answer; do not send it again."
68
+ : state === "not-confirmed" ? (delivery ? "Approved, but delivery is not confirmed. Check delivery_status with its delivery_id before sending anything again."
69
+ : "Approved, but its delivery is no longer on record, so it cannot be confirmed. Ask the target whether it got it before sending anything again.")
70
+ : "Not forwarded. Send again only if it is still needed (a new request needs approval again).";
71
+ return {
72
+ short_id: shortContactTicketId(t.id), ticket_id: t.id, to: host.label(t.target), verb: t.verb, state,
73
+ asked_at: t.createdAt, ...(t.decidedAt ? { decided_at: t.decidedAt } : {}),
74
+ ...(t.grantId ? { approved_by_rule: true } : t.decidedBy ? { decided_by: by(t.decidedBy) } : {}),
75
+ ...(state === "pending" ? { expires_at: t.expiresAt } : {}), ...(t.deliveryId ? { delivery_id: t.deliveryId } : {}), next,
76
+ };
77
+ });
78
+ return { requests, ...(requests.length ? {} : { note: "None of your messages to other agents were held." }) };
79
+ }
80
+ //# sourceMappingURL=contact-state-view.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contact-state-view.js","sourceRoot":"","sources":["../src/contact-state-view.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,oBAAoB,EAAE,MAAM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AE,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAChG,GAAG,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI;SAC1H,CAAC;IACJ,CAAC,CAAC,CAAC;IACH,OAAO,EAAE,QAAQ,EAAE,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,kDAAkD,EAAE,CAAC,EAAE,CAAC;AAChH,CAAC"}
@@ -1,12 +1,13 @@
1
+ type HubHeldCloseOutcome = import("./hub/question-close-model.js").HubHeldCloseOutcome;
1
2
  import { type HostAlertSettings } from './host-monitoring-alert-settings.js';
2
3
  import { type SetupTokenOwner, type SetupTokenRequest } from "./claude-setup-token.js";
3
4
  import { type ClaudeCredentialKind, type ClaudeCredentialMetadata, type CredentialActor } from "./claude-credential-vault.js";
4
5
  import { type ContactFileLease } from "./contact-auth-files.js";
5
- import { type ContactOriginClear, type ContactPerson, type ContactPermissions, type ContactPermissionsWrite, type ContactTicketDecision } from "./contact-auth-types.js";
6
+ import { type ContactOriginClear, type ContactPerson, type ContactPermissions, type ContactPermissionsWrite, type ContactTicket, type ContactTicketDecision } from "./contact-auth-types.js";
6
7
  import { type HubSharingController } from "./hub-sharing-notice.js";
7
8
  import { type SettingsSummaryPresentation } from "./settings-summary.js";
8
9
  import { AgentRuntimeChanges } from "./agent-runtime-change.js";
9
- import { type HumanOrigin } from "./human-delivery-receipts.js";
10
+ import { type WebSessionIdentity, type HumanOrigin } from "./human-delivery-receipts.js";
10
11
  import { SettingsConfirmationStore, type SettingsPendingView } from "./settings-confirmation.js";
11
12
  import { type GeneralSwitchInput } from "./general-binding.js";
12
13
  import { SettingsExecution } from "./settings-transaction.js";
@@ -1016,6 +1017,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
1016
1017
  private signInKeepAlive;
1017
1018
  private hubExecutionAttention;
1018
1019
  /** M-3632: the member's "Try again" for a held Hub question (null while no member runs). */
1020
+ private hubHeldClose;
1019
1021
  private hubHeldRetry;
1020
1022
  private missedOfflineStore;
1021
1023
  private configHistory;
@@ -1451,7 +1453,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
1451
1453
  retryAfterMs?: number;
1452
1454
  };
1453
1455
  /**
1454
- * alpha.2 (M-2300; #2973's agent requests, junsion's §6): on a fleet with no chat connection there is no General to
1456
+ * alpha.2 (M-2300; #2973's agent requests, a colleague's §6): on a fleet with no chat connection there is no General to
1455
1457
  * post an agent's Windows request in — it waited for `agend settings confirm` on the host. Its owner (decision
1456
1458
  * 28c2d3a3: the `agend web --code` session on this computer, web-verified) now sees and decides it from the web's
1457
1459
  * Needs you. The authority is asked from the request each time, and again at execution by the store (`current`):
@@ -1762,11 +1764,93 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
1762
1764
  writeContactPermissions(name: string, raw: ContactPermissionsWrite, actor: ContactPerson): ContactPermissions;
1763
1765
  clearContactOrigin(name: string, raw: ContactOriginClear, actor: ContactPerson): ContactPermissions;
1764
1766
  /** General can propose only. The platform callback supplies the human actor. */
1767
+ /** M-3693: what contact permissions hold now, for General (read-only; no write, no identity computed here). */
1768
+ contactState(agent?: string): {
1769
+ held: Record<string, unknown>[];
1770
+ held_truncated?: string | undefined;
1771
+ grants: {
1772
+ grant_id: string;
1773
+ target: string;
1774
+ revision: number;
1775
+ person: string;
1776
+ from: string;
1777
+ verbs: import("./contact-auth-types.js").ContactVerb[];
1778
+ expires_at: string;
1779
+ remaining_uses: number | null;
1780
+ current: boolean;
1781
+ }[];
1782
+ rooms: {
1783
+ room: string;
1784
+ mode: string;
1785
+ stored_as: "legacy" | "restricted";
1786
+ revision: number;
1787
+ }[];
1788
+ retained_origins: {
1789
+ agent: string;
1790
+ kind: "mixed" | "unknown";
1791
+ people: string[];
1792
+ chain: string[];
1793
+ }[];
1794
+ how_to: string[];
1795
+ };
1796
+ /** M-3716: the caller's OWN held requests (delivery_status { held_requests: true }); the caller is the authenticated agent. */
1797
+ ownContactRequests(agent: string): {
1798
+ requests: ({
1799
+ short_id: string;
1800
+ ticket_id: string;
1801
+ to: string;
1802
+ verb: import("./contact-auth-types.js").ContactVerb;
1803
+ state: string;
1804
+ asked_at: string;
1805
+ decided_at?: string | undefined;
1806
+ approved_by_rule: boolean;
1807
+ expires_at?: string | undefined;
1808
+ delivery_id?: string | undefined;
1809
+ next: string;
1810
+ } | {
1811
+ short_id: string;
1812
+ ticket_id: string;
1813
+ to: string;
1814
+ verb: import("./contact-auth-types.js").ContactVerb;
1815
+ state: string;
1816
+ asked_at: string;
1817
+ decided_at?: string | undefined;
1818
+ decided_by: string | undefined;
1819
+ expires_at?: string | undefined;
1820
+ delivery_id?: string | undefined;
1821
+ next: string;
1822
+ } | {
1823
+ short_id: string;
1824
+ ticket_id: string;
1825
+ to: string;
1826
+ verb: import("./contact-auth-types.js").ContactVerb;
1827
+ state: string;
1828
+ asked_at: string;
1829
+ decided_at?: string | undefined;
1830
+ expires_at?: string | undefined;
1831
+ delivery_id?: string | undefined;
1832
+ next: string;
1833
+ })[];
1834
+ note?: string | undefined;
1835
+ };
1765
1836
  requestContactChange(requester: string, raw: unknown, callerCurrent: () => boolean): Promise<{
1766
1837
  status: string;
1767
1838
  }>;
1768
1839
  private handleContactChangeCallback;
1769
- contactAuthorization(id: string, actor: ContactPerson): import("./contact-auth-types.js").ContactTicket;
1840
+ /**
1841
+ * M-3680 (the user, 11-25): a fleet agent's send held for approval reaches an administrator in General on the target's
1842
+ * Discord or Telegram, as a card with Approve once / Decline — until then a held request had no chat path (the live
1843
+ * Needs you message lists it without buttons). One card per request. Whoever clicks must be one who may decide it
1844
+ * (ContactAuthService.view(...).canDecide, read at the click); the decision is theirs, never the bot's. A request decided
1845
+ * anywhere else (the web, another card) retires its card. #4448 (R21079937): a ClassicBot room's request to a fleet agent
1846
+ * gets the same card, in the General of the target's connection; a room's request to anything else gets none.
1847
+ */
1848
+ /** Requests whose card was posted or tried: forgotten when the request is decided, and at most HELD_CARDS_KEPT. */
1849
+ private heldTicketCards?;
1850
+ private syncHeldTicketCard;
1851
+ private postHeldTicketCard;
1852
+ private handleContactTicketCallback;
1853
+ contactAuthorization(id: string, actor: ContactPerson): ContactTicket;
1770
1854
  contactAuthorizations(actor: ContactPerson, filter: {
1771
1855
  agent?: string;
1772
1856
  status?: string;
@@ -1774,11 +1858,19 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
1774
1858
  cursor?: string;
1775
1859
  }): {
1776
1860
  nextCursor: string | null;
1777
- items: import("./contact-auth-types.js").ContactTicket[];
1861
+ items: ContactTicket[];
1778
1862
  };
1779
- decideContactAuthorization(id: string, decision: ContactTicketDecision, actor: ContactPerson): import("./contact-auth-types.js").ContactTicket;
1863
+ decideContactAuthorization(id: string, decision: ContactTicketDecision, actor: ContactPerson): ContactTicket;
1780
1864
  /** Status only: no human receipt, approval capability or original correlation is attached. */
1781
1865
  private sweepContactAuthorizationOutcomes;
1866
+ /**
1867
+ * M-3710: how many contact requests wait, and since when — no ids, people or text. Needs you tells an admin session with
1868
+ * no verified person behind it (contactActor null) that they exist, so a request is never silently missing there.
1869
+ */
1870
+ contactPendingCount(): {
1871
+ count: number;
1872
+ since: number;
1873
+ };
1782
1874
  contactNeeds(actor: ContactPerson): WebNeedsItem[];
1783
1875
  /**
1784
1876
  * The chat's contact items. M-3381 (the user, beta.14): the restricted-mode suggestions are ONE low-key line per world —
@@ -2308,6 +2400,12 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
2308
2400
  adminGate(userId: string, ownerAdapterId?: string): "ok" | "disabled" | "denied";
2309
2401
  /** Fleet admin is an explicit config allowlist entry, not merely an open/paired user. See adminGate. */
2310
2402
  isFleetAdmin(userId: string, adapterId?: string): boolean;
2403
+ /**
2404
+ * Free mode at /start is the fleet-admin allowlist of the adapter that owns the room (adminGate).
2405
+ * A ClassicBot admin (`classicBot.yaml` admin_users) is not enough. A stub with no fleet and no worlds
2406
+ * is not an admin: the menu offers Restricted only.
2407
+ */
2408
+ private canChooseFreeMode;
2311
2409
  /** Whether this adapter has any fleet admin at all (an empty allowlist means the admin commands are off). */
2312
2410
  hasFleetAdmins(adapterId?: string): boolean;
2313
2411
  /**
@@ -4177,12 +4275,16 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
4177
4275
  onAttentionChanged(name: string): void;
4178
4276
  /** The list for the web: every world's items, and those of instances with no world (#1386 §5.0). */
4179
4277
  needsYouItems(): WebNeedsItem[];
4180
- /** Enabled member composition supplies only a local attention reader, never an approval/execution callback. */
4181
- attachHubExecutionAttention(read: (() => import("./needs-you.js").HubExecutionAttentionInput[]) | null, retry?: ((id: string) => "queued" | "not-found" | "not-retryable") | null): void;
4278
+ /** Enabled member composition supplies held-work readers and explicit owner retry/close operations. */
4279
+ attachHubExecutionAttention(read: (() => import("./needs-you.js").HubExecutionAttentionInput[]) | null, retry?: ((id: string) => "queued" | "not-found" | "not-retryable") | null, close?: ((id: string) => Promise<HubHeldCloseOutcome>) | undefined): void;
4182
4280
  /**
4183
4281
  * M-3632: Needs you → "Try again" on held Hub work (`hub:hold:<row>`). The question goes back through the member's whole
4184
4282
  * hand-off, including the Hub's begin lease; nothing is delivered without it.
4185
4283
  */
4284
+ closeHubHeld(itemId: string, actor: ContactPerson): Promise<{
4285
+ status: number;
4286
+ code: string;
4287
+ }>;
4186
4288
  retryHubHeld(itemId: string): {
4187
4289
  status: 200 | 404 | 409;
4188
4290
  code: "queued" | "not-found" | "not-retryable";
@@ -4339,6 +4441,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
4339
4441
  name: string;
4340
4442
  guest?: true;
4341
4443
  authority?: HumanAuthority;
4444
+ identity?: WebSessionIdentity;
4342
4445
  }): Promise<{
4343
4446
  status: 200 | 400 | 403 | 409;
4344
4447
  error?: string;
@@ -4381,6 +4484,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
4381
4484
  * #1939 S1: the design's §3 for one web request (authority/web-authority.ts), with this fleet's admins, policy and
4382
4485
  * token; `instance` once the body has named it. Observe only: receipts record it, no agent acts on it yet.
4383
4486
  */
4487
+ /** A signed-in account is recognizable before verification; this supplies no action authority. */
4488
+ webSessionIdentity(session: SessionRecord): WebSessionIdentity | undefined;
4384
4489
  webAuthority(input: {
4385
4490
  session: SessionRecord | null;
4386
4491
  gateway: boolean;
@@ -4404,6 +4509,14 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
4404
4509
  ok: false;
4405
4510
  refusal: WebAuthorityRefusal;
4406
4511
  };
4512
+ /** M-3651 (auth-api's /auth/session): until when this guest session is verified as its account now; null when it is not. */
4513
+ guestVerifiedUntil(req: IncomingMessage, session: SessionRecord): number | null;
4514
+ /**
4515
+ * M-3651: a guest session that signed in with a code AgEnD delivered privately to its own account — recorded as that
4516
+ * account's authorization of it, judged by evaluateGuestIdentity (the switch, the links, "Only this computer", the token):
4517
+ * its messages then carry `web-guest`, who it is and never more. Only at sign-in: a guest is never sent a Confirm card.
4518
+ */
4519
+ private authorizeGuestSession;
4407
4520
  /**
4408
4521
  * M-3277 (decision 7933bf90; auth-api, at sign-in): an admin session that signed in with a code AgEnD delivered privately
4409
4522
  * to its account (a DM, or Discord's ephemeral reply) starts verified — that code went to the very DM a Confirm card
@@ -4714,6 +4827,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
4714
4827
  publicLink: boolean;
4715
4828
  person?: Pick<WebPersonView, "userId" | "name">;
4716
4829
  authority?: HumanAuthority;
4830
+ identity?: WebSessionIdentity;
4717
4831
  guest?: boolean;
4718
4832
  }): Promise<WebCommandResult>;
4719
4833
  /** Consume `/clear` Confirm/Cancel exactly once; only Confirm reaches IPC. */
@@ -5961,21 +6075,34 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
5961
6075
  /** #2072: from the published snapshot (no `which` on the loop); not checked yet counts as installed (no false alarm). */
5962
6076
  private isBackendInstalled;
5963
6077
  private getMissingBackendWarning;
5964
- /** Coverage is not proven before launch; disclose the fallback without blocking an unsupported CLI. */
5965
- private getClassicStartWarning;
5966
- /** Handle Discord's required static slash choice, warning before a likely startup failure. */
6078
+ /** Discord buttons when the interaction can draw them; otherwise the adapter's own chooser. Never the backend select. */
6079
+ private classicModePoster;
6080
+ /** Where the finished start (and a hold notice) lands: the Discord interaction, or the Telegram menu message. */
6081
+ private classicStartComplete;
6082
+ /** Handle Discord's required static slash choice. The room waits for the mode menu. */
5967
6083
  private handleClassicStartSlash;
5968
6084
  private handleClassicStartSlashCore;
5969
- /** Present platform-native backend choices, then start on selection or timeout. */
6085
+ /** Present platform-native backend choices. A choice opens the mode menu; a timeout or a failed menu creates nothing. */
5970
6086
  private beginClassicBackendSelection;
5971
- /** Consume a selection callback. Returns true for all ClassicBot callback IDs, including stale ones. */
6087
+ /** Drop a pending /start without creating a room. */
6088
+ private cancelClassicPending;
6089
+ /** Consume a backend click. Returns true for every classic-backend id, including a stale one. */
5972
6090
  private handleClassicBackendSelection;
5973
- /** Atomically claim one pending request so timeout/click races create at most one instance. */
6091
+ /** The backend is chosen. Retire that menu and ask for the mode. Nothing is registered here. */
5974
6092
  private finishClassicBackendSelection;
6093
+ /** After a backend is known (slash, `/start BACKEND`, or a backend click). The room waits for a mode click. */
6094
+ private beginClassicModeSelection;
6095
+ /** For a fleet admin, Free is first and labeled recommended. Restricted stays a button.
6096
+ * Anyone else sees only Restricted. Either way the room waits for a tap. */
6097
+ private openClassicModeMenu;
6098
+ /** Consume a mode click. A Free click from anyone else is ignored and the menu stays up. */
6099
+ private handleClassicModeSelection;
6100
+ /** Claim the mode choice and create the room. A second click or the timeout finds nothing. */
6101
+ private finishClassicModeSelection;
5975
6102
  /** Start a classic channel instance with lightweight config */
5976
6103
  private startClassicInstance;
5977
6104
  /** Handle /start slash command — register classic channel */
5978
- handleClassicStart(channelId: string, channelName: string, userId: string, guildId?: string, adapterId?: string, backend?: string): Promise<string>;
6105
+ handleClassicStart(channelId: string, channelName: string, userId: string, guildId?: string, adapterId?: string, backend?: string, restricted?: boolean): Promise<string>;
5979
6106
  /** Handle /stop slash command — unregister classic channel */
5980
6107
  handleClassicStop(channelId: string, adapterId?: string): Promise<string>;
5981
6108
  /**
@@ -6412,3 +6539,4 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
6412
6539
  }
6413
6540
  /** alpha.2 (M-2300): the agent an applied Windows request created (its name, for the page's "Open chat"), or null. */
6414
6541
  export declare function agentNameOf(view: SettingsPendingView): string | null;
6542
+ export {};