@segmentstream/agent 0.86.2 → 0.87.0

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 (89) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/_chunks/{build-metadata-DD8NyjVs.mjs → build-metadata-BGQyCVyy.mjs} +1 -1
  3. package/dist/_chunks/{chat-archive-By3MnPEC.mjs → chat-archive-DwSKmO-f.mjs} +1 -1
  4. package/dist/_chunks/{principal-C1g8wCIg.mjs → principal-h5knGNwo.mjs} +3 -3
  5. package/dist/_chunks/{silent-C9x3GcMg.mjs → silent-CsgJLKrZ.mjs} +1 -1
  6. package/dist/extension/connections/ontology.mjs +1 -1
  7. package/dist/extension/extension.d.ts +1 -0
  8. package/dist/extension/extension.mjs +2 -1
  9. package/dist/extension/hooks/authorization.mjs +1 -1
  10. package/dist/extension/instructions/persona.mjs +1 -1
  11. package/dist/extension/instructions/revision.mjs +7 -4
  12. package/dist/extension/lib/actor.d.ts +1 -1
  13. package/dist/extension/lib/actor.mjs +1 -1
  14. package/dist/extension/lib/attachment-tools.mjs +1 -1
  15. package/dist/extension/lib/attachments-dispatch.mjs +2 -2
  16. package/dist/extension/lib/attachments-send.mjs +1 -1
  17. package/dist/extension/lib/attachments.mjs +1 -1
  18. package/dist/extension/lib/build-metadata.mjs +1 -1
  19. package/dist/extension/lib/chat-address.mjs +1 -1
  20. package/dist/extension/lib/chat-context.mjs +1 -1
  21. package/dist/extension/lib/chat-recorder.mjs +3 -3
  22. package/dist/extension/lib/confirmations.mjs +1 -1
  23. package/dist/extension/lib/email/attachments-send.mjs +1 -1
  24. package/dist/extension/lib/email/channel.mjs +2 -2
  25. package/dist/extension/lib/guest-usage.mjs +1 -1
  26. package/dist/extension/lib/inbound-media/files.mjs +1 -1
  27. package/dist/extension/lib/inbound-media/index.mjs +1 -1
  28. package/dist/extension/lib/ontology-connection.mjs +1 -1
  29. package/dist/extension/lib/ontology-file-call.mjs +1 -1
  30. package/dist/extension/lib/ontology-recall.mjs +1 -1
  31. package/dist/extension/lib/ontology-tools.mjs +1 -1
  32. package/dist/extension/lib/review/client.mjs +6 -1
  33. package/dist/extension/lib/review/files.mjs +1 -1
  34. package/dist/extension/lib/review/hold.d.ts +11 -1
  35. package/dist/extension/lib/review/hold.mjs +1 -1
  36. package/dist/extension/lib/review/reply.mjs +2 -2
  37. package/dist/extension/lib/review/revision-channel.d.ts +10 -1
  38. package/dist/extension/lib/review/revision-channel.mjs +66 -7
  39. package/dist/extension/lib/review/revision.d.ts +93 -2
  40. package/dist/extension/lib/review/revision.mjs +179 -2
  41. package/dist/extension/lib/role-skill.mjs +1 -1
  42. package/dist/extension/lib/runtime-envelope.mjs +1 -1
  43. package/dist/extension/lib/sent-files.mjs +1 -1
  44. package/dist/extension/lib/slack/adapter.mjs +1 -1
  45. package/dist/extension/lib/slack/attachments-send.mjs +1 -1
  46. package/dist/extension/lib/slack/callbacks.mjs +1 -1
  47. package/dist/extension/lib/stored-files.mjs +1 -1
  48. package/dist/extension/lib/telegram/adapter.mjs +4 -4
  49. package/dist/extension/lib/telegram/attachment-description.mjs +1 -1
  50. package/dist/extension/lib/telegram/attachments-send.mjs +1 -1
  51. package/dist/extension/lib/telegram/callbacks.mjs +1 -1
  52. package/dist/extension/lib/telegram/chat-archive.mjs +1 -1
  53. package/dist/extension/lib/telegram/confirmations.mjs +1 -1
  54. package/dist/extension/lib/telegram/customer-text.mjs +1 -1
  55. package/dist/extension/lib/telegram/files.mjs +1 -1
  56. package/dist/extension/lib/telegram/health.mjs +1 -1
  57. package/dist/extension/lib/telegram/held-approvals.mjs +1 -1
  58. package/dist/extension/lib/telegram/inbound-request.mjs +1 -1
  59. package/dist/extension/lib/telegram/inbound.mjs +2 -2
  60. package/dist/extension/lib/telegram/lifecycle.mjs +2 -2
  61. package/dist/extension/lib/telegram/principal.mjs +1 -1
  62. package/dist/extension/lib/telegram/routing-context.mjs +1 -1
  63. package/dist/extension/lib/telegram/session-recovery.mjs +1 -1
  64. package/dist/extension/lib/telegram/silent.mjs +1 -1
  65. package/dist/extension/lib/telegram/store-capture.mjs +1 -1
  66. package/dist/extension/lib/telegram/structured.mjs +1 -1
  67. package/dist/extension/lib/telegram/turn-errors.mjs +2 -2
  68. package/dist/extension/lib/web/auth.mjs +1 -1
  69. package/dist/extension/lib/web/channel.mjs +1 -1
  70. package/dist/extension/lib/whatsapp/adapter.mjs +1 -1
  71. package/dist/extension/lib/whatsapp/attachments-send.mjs +1 -1
  72. package/dist/extension/lib/whatsapp/callbacks.mjs +1 -1
  73. package/dist/extension/lib/whatsapp/files.mjs +1 -1
  74. package/dist/extension/lib/workspace-action.mjs +1 -1
  75. package/dist/extension/lib/workspace-channel/attachments-send.mjs +1 -1
  76. package/dist/extension/lib/workspace-channel/channel.mjs +2 -2
  77. package/dist/extension/lib/workspace-source.mjs +1 -1
  78. package/dist/extension/model.mjs +1 -1
  79. package/dist/extension/tools/attachments_discard.mjs +1 -1
  80. package/dist/extension/tools/attachments_list.mjs +1 -1
  81. package/dist/extension/tools/attachments_promote.mjs +1 -1
  82. package/dist/extension/tools/attachments_read.mjs +1 -1
  83. package/dist/extension/tools/attachments_send.mjs +2 -2
  84. package/dist/extension/tools/attachments_stage.mjs +1 -1
  85. package/dist/extension/tools/attachments_table.mjs +1 -1
  86. package/dist/extension/tools/handoff.mjs +1 -1
  87. package/dist/extension/tools/questions_ask.mjs +1 -1
  88. package/dist/extension/tools/workspace_source.mjs +1 -1
  89. package/package.json +2 -2
@@ -1,6 +1,7 @@
1
1
  import type { SessionAuthContext } from "eve/context";
2
2
  import type { ChatArchive } from "../chat-archive.js";
3
3
  import type { RuntimeToken } from "../runtime-token.js";
4
+ import type { HeldReply } from "./hold.js";
4
5
  /**
5
6
  * Redrafts (`docs/agent.md`, "Reply review"): a member hands a reply the agent held for review back
6
7
  * with a note, and the agent writes it again in a session of its own. That session acts as the
@@ -18,6 +19,10 @@ export declare const REVISION_SCOPE = "ontology:read";
18
19
  export declare const AGENT_SCOPE_HEADER = "X-SegmentStream-Agent-Scope";
19
20
  /** The redraft channel's address of one redraft of a review. */
20
21
  export declare function revisionAddress(reviewId: string, revision: string): string;
22
+ /** The redraft channel's address of one draft asked for in a chat. */
23
+ export declare function draftAddress(request: string): string;
24
+ /** The key a draft asked for is held under, as the ontology answered the request with it. */
25
+ export declare function requestedDraftKey(request: string): string;
21
26
  /** A held reply handed back for redrafting, as the ontology's request names it. */
22
27
  export interface RevisionRequest {
23
28
  readonly reviewId: string;
@@ -39,17 +44,89 @@ export interface RevisionRequest {
39
44
  readonly chatKind: "private" | "group";
40
45
  readonly draft: string;
41
46
  }
47
+ /**
48
+ * A draft a member or workflow asked for in a person's private chat (`agent_chat.draft`), as the
49
+ * ontology's request names it: the chat, the message to answer, and what holding the draft needs.
50
+ */
51
+ export interface DraftRequest {
52
+ /** The request, which keys the draft the session holds. */
53
+ readonly request: string;
54
+ /** What to write, in the requester's words; absent when they gave none. */
55
+ readonly note?: string;
56
+ /** The user who asked, recorded on the draft. */
57
+ readonly notedBy: string;
58
+ /** The person the reply is for, and the roles they hold now. */
59
+ readonly memberId: string;
60
+ readonly roles: ReadonlyArray<string>;
61
+ readonly provider: HeldReply["provider"];
62
+ /** The channel the chat is on, by name, as the chat archive keys it. */
63
+ readonly channel: string;
64
+ readonly chatId: string;
65
+ /** The thread the chat archive keeps the message in; null without one. */
66
+ readonly threadId: string | null;
67
+ /** The person's message the draft answers, with its files by name, type and size. */
68
+ readonly message: {
69
+ readonly id: string;
70
+ readonly at: string;
71
+ readonly text: string | null;
72
+ readonly files: ReadonlyArray<DraftMessageFile>;
73
+ };
74
+ /** Whom the provider sends the reply to, and the thread it goes in, `""` without one. */
75
+ readonly recipient: string;
76
+ readonly replyThreadId: string;
77
+ readonly replyTo: string | null;
78
+ /** Where the chat stood when the draft was asked for, `<time>~<id>`. */
79
+ readonly basis: string;
80
+ }
81
+ /** A file of the message a draft answers, as the chat store describes it. */
82
+ export interface DraftMessageFile {
83
+ readonly name?: string;
84
+ readonly type?: string;
85
+ readonly size?: number;
86
+ }
42
87
  /** The ontology's request, or `undefined` when it is not one. */
43
88
  export declare function revisionRequest(body: unknown): RevisionRequest | undefined;
89
+ /** The ontology's request for a draft in a chat, or `undefined` when it is not one. */
90
+ export declare function draftRequest(body: unknown): DraftRequest | undefined;
91
+ /**
92
+ * The principal of a session that drafts a reply asked for in a chat: the person the reply is for,
93
+ * with the roles they hold now, reading only, as a redraft's is; it holds the draft when its turn
94
+ * ends, under the request's key.
95
+ */
96
+ export declare function draftPrincipal(request: DraftRequest): SessionAuthContext;
97
+ /**
98
+ * The draft asked for in a chat that a session writes, by its request and the person it acts for;
99
+ * `undefined` for any other session, a redraft's included. Workspace instructions for such a
100
+ * session test it, as the starter's `instructions/drafting.ts` does.
101
+ */
102
+ export declare function draftRequestOf(principal: SessionAuthContext | null | undefined): {
103
+ readonly request: string;
104
+ readonly memberId: string;
105
+ } | undefined;
106
+ /**
107
+ * The draft a drafting session holds when its turn ends, with `text`; `undefined` for a redraft
108
+ * session or any other.
109
+ */
110
+ export declare function requestedDraft(input: {
111
+ readonly principal: SessionAuthContext | null | undefined;
112
+ readonly sessionId: string;
113
+ readonly turnId: string | undefined;
114
+ readonly text: string;
115
+ }): HeldReply | undefined;
44
116
  /**
45
117
  * The principal of a redraft session: the person the reply is for, with the roles they hold now, so
46
118
  * the session writes as the agent writes to them, and none of the agent's own tools. It comes from
47
119
  * the ontology's request, which only this deployment's functions may make.
48
120
  */
49
121
  export declare function revisionPrincipal(request: RevisionRequest): SessionAuthContext;
50
- /** The review and redraft a redraft session's principal names; `undefined` for any other session. */
122
+ /**
123
+ * What a drafting session's principal names: the review a redraft rewrites, or none for a draft
124
+ * asked for in a chat; the redraft or request; the person; and `subject`, the key its events and
125
+ * connections are kept under. `undefined` for any other session.
126
+ */
51
127
  export declare function revisionOf(principal: SessionAuthContext | null | undefined): {
52
- readonly reviewId: string;
128
+ readonly subject: string;
129
+ readonly reviewId?: string;
53
130
  readonly revision: string;
54
131
  readonly memberId: string;
55
132
  } | undefined;
@@ -83,6 +160,20 @@ export declare function revisionContext(input: {
83
160
  readonly stream: SessionStream;
84
161
  readonly log?: (message: string, detail: unknown) => void;
85
162
  }): Promise<ReadonlyArray<string>>;
163
+ /**
164
+ * The context a session that drafts a reply asked for starts with: the chat with the person, and
165
+ * the person's message the draft answers. A chat that cannot be read is left out.
166
+ */
167
+ export declare function draftContext(input: {
168
+ readonly request: DraftRequest;
169
+ readonly archive: ChatArchive;
170
+ readonly log?: (message: string, detail: unknown) => void;
171
+ }): Promise<ReadonlyArray<string>>;
172
+ /**
173
+ * What a session drafting a reply asked for is sent: the person's message itself, as their own
174
+ * session would have been; the requester's note is in its context.
175
+ */
176
+ export declare function draftPrompt(request: DraftRequest): string;
86
177
  /** Reports what became of a redraft: its text, or, without one, that the agent wrote none. */
87
178
  export type ReportRevision = (input: {
88
179
  readonly reviewId: string;
@@ -16,9 +16,42 @@ const AGENT_SCOPE_HEADER = "X-SegmentStream-Agent-Scope";
16
16
  function revisionAddress(reviewId, revision) {
17
17
  return `revision:${reviewId}:${revision}`;
18
18
  }
19
+ function draftAddress(request) {
20
+ return `draft:${request}`;
21
+ }
22
+ function requestedDraftKey(request) {
23
+ return `request:${request}`;
24
+ }
25
+ function messageFiles(value) {
26
+ if (value === void 0) return [];
27
+ if (!Array.isArray(value) || value.length > 50) return;
28
+ const files = [];
29
+ for (const entry of value) {
30
+ if (typeof entry !== "object" || entry === null || Array.isArray(entry)) return;
31
+ const file = entry;
32
+ const name = file.name === void 0 ? void 0 : text(file.name);
33
+ const type = file.type === void 0 ? void 0 : text(file.type, 255);
34
+ const size = typeof file.size === "number" && Number.isSafeInteger(file.size) && file.size >= 0 ? file.size : void 0;
35
+ if (file.name !== void 0 && name === void 0 || file.type !== void 0 && type === void 0 || file.size !== void 0 && size === void 0) return;
36
+ files.push({
37
+ ...name === void 0 ? {} : { name },
38
+ ...type === void 0 ? {} : { type },
39
+ ...size === void 0 ? {} : { size }
40
+ });
41
+ }
42
+ return files;
43
+ }
44
+ const PROVIDERS = new Set([
45
+ "telegram",
46
+ "slack",
47
+ "whatsapp",
48
+ "email",
49
+ "custom"
50
+ ]);
19
51
  const ID = /^[0-9A-Za-z][0-9A-Za-z:_.@+-]{0,511}$/u;
20
52
  const NOTE_LIMIT = 2e3;
21
53
  const TEXT_LIMIT = 2e4;
54
+ const MESSAGE_TEXT_LIMIT = 1e5;
22
55
  function text(value, limit = 512) {
23
56
  return typeof value === "string" && value !== "" && value.length <= limit ? value : void 0;
24
57
  }
@@ -54,6 +87,113 @@ function revisionRequest(body) {
54
87
  draft
55
88
  };
56
89
  }
90
+ function draftRequest(body) {
91
+ if (typeof body !== "object" || body === null || Array.isArray(body)) return;
92
+ const record = body;
93
+ const request = text(record.request, 64);
94
+ const note = record.note === void 0 ? void 0 : text(record.note, NOTE_LIMIT)?.trim();
95
+ const notedBy = text(record.noted_by);
96
+ const memberId = text(record.member_id);
97
+ const provider = text(record.provider, 64);
98
+ const channel = text(record.channel, 64);
99
+ const chatId = text(record.chat_id);
100
+ const threadId = record.thread_id === null ? null : text(record.thread_id);
101
+ const recipient = text(record.recipient);
102
+ const replyThreadId = record.reply_thread_id === "" ? "" : text(record.reply_thread_id);
103
+ const replyTo = record.reply_to === null ? null : text(record.reply_to);
104
+ const basis = text(record.basis, 128);
105
+ const roles = record.roles;
106
+ const message = typeof record.message === "object" && record.message !== null ? record.message : void 0;
107
+ const messageId = text(message?.id, 64);
108
+ const messageAt = text(message?.at, 64);
109
+ const messageText = message?.text === null ? null : text(message?.text, MESSAGE_TEXT_LIMIT);
110
+ const messageFilesFound = messageFiles(message?.files);
111
+ if (request === void 0 || record.note !== void 0 && (note === void 0 || note === "") || notedBy === void 0 || memberId === void 0 || !ID.test(memberId) || provider === void 0 || !PROVIDERS.has(provider) || channel === void 0 || chatId === void 0 || threadId === void 0 || recipient === void 0 || replyThreadId === void 0 || replyTo === void 0 || basis === void 0 || messageId === void 0 || messageAt === void 0 || messageText === void 0 || messageFilesFound === void 0 || !Array.isArray(roles) || !roles.every((role) => typeof role === "string") || record.chat_kind !== "private") return;
112
+ return {
113
+ request,
114
+ ...note === void 0 ? {} : { note },
115
+ notedBy,
116
+ memberId,
117
+ roles,
118
+ provider,
119
+ channel,
120
+ chatId,
121
+ threadId,
122
+ message: {
123
+ id: messageId,
124
+ at: messageAt,
125
+ text: messageText,
126
+ files: messageFilesFound
127
+ },
128
+ recipient,
129
+ replyThreadId,
130
+ replyTo,
131
+ basis
132
+ };
133
+ }
134
+ const REQUESTED = "requested";
135
+ function draftPrincipal(request) {
136
+ const hold = {
137
+ provider: request.provider,
138
+ channel: request.channel,
139
+ chatId: request.chatId,
140
+ recipient: request.recipient,
141
+ threadId: request.replyThreadId,
142
+ replyTo: request.replyTo,
143
+ ...request.note === void 0 ? {} : { note: request.note },
144
+ notedBy: request.notedBy,
145
+ basis: request.basis
146
+ };
147
+ return {
148
+ authenticator: REVISION_AUTHENTICATOR,
149
+ principalType: "user",
150
+ principalId: request.memberId,
151
+ attributes: {
152
+ memberId: request.memberId,
153
+ roles: request.roles,
154
+ revision: request.request,
155
+ [REQUESTED]: JSON.stringify(hold)
156
+ }
157
+ };
158
+ }
159
+ function draftRequestOf(principal) {
160
+ const drafting = revisionOf(principal);
161
+ return drafting === void 0 || drafting.reviewId !== void 0 ? void 0 : {
162
+ request: drafting.revision,
163
+ memberId: drafting.memberId
164
+ };
165
+ }
166
+ function requestedDraft(input) {
167
+ const drafting = revisionOf(input.principal);
168
+ const attribute = input.principal?.attributes[REQUESTED];
169
+ if (drafting === void 0 || drafting.reviewId !== void 0 || typeof attribute !== "string") return;
170
+ let hold;
171
+ try {
172
+ hold = JSON.parse(attribute);
173
+ } catch {
174
+ return;
175
+ }
176
+ return {
177
+ key: requestedDraftKey(drafting.revision),
178
+ provider: hold.provider,
179
+ ...hold.channel === hold.provider ? {} : { channel: hold.channel },
180
+ chatId: hold.chatId,
181
+ recipient: hold.recipient,
182
+ threadId: hold.threadId,
183
+ replyTo: hold.replyTo,
184
+ memberId: drafting.memberId,
185
+ sessionId: input.sessionId,
186
+ text: input.text.slice(0, TEXT_LIMIT),
187
+ mode: "requested",
188
+ confidence: null,
189
+ ...input.turnId === void 0 ? {} : { turnId: input.turnId },
190
+ requested: {
191
+ ...hold.note === void 0 ? {} : { note: hold.note },
192
+ notedBy: hold.notedBy,
193
+ basis: hold.basis
194
+ }
195
+ };
196
+ }
57
197
  function revisionPrincipal(request) {
58
198
  return {
59
199
  authenticator: REVISION_AUTHENTICATOR,
@@ -70,10 +210,17 @@ function revisionPrincipal(request) {
70
210
  function revisionOf(principal) {
71
211
  if (principal?.authenticator !== "segmentstream-review-revision") return;
72
212
  const { reviewId, revision, memberId } = principal.attributes;
73
- return typeof reviewId === "string" && reviewId !== "" && typeof revision === "string" && revision !== "" && typeof memberId === "string" && memberId !== "" ? {
213
+ if (typeof revision !== "string" || revision === "" || typeof memberId !== "string" || memberId === "") return;
214
+ if (typeof reviewId === "string" && reviewId !== "") return {
215
+ subject: reviewId,
74
216
  reviewId,
75
217
  revision,
76
218
  memberId
219
+ };
220
+ return typeof principal.attributes[REQUESTED] === "string" ? {
221
+ subject: requestedDraftKey(revision),
222
+ revision,
223
+ memberId
77
224
  } : void 0;
78
225
  }
79
226
  const eveSessionStream = async function* (sessionId) {
@@ -152,6 +299,36 @@ async function revisionContext(input) {
152
299
  `<draft>\n${request.draft}\n</draft>`
153
300
  ];
154
301
  }
302
+ async function draftContext(input) {
303
+ const { request } = input;
304
+ const log = input.log ?? ((message, detail) => console.error(message, detail));
305
+ const chat = await readChat(input.archive, {
306
+ provider: request.channel,
307
+ chatId: request.chatId,
308
+ threadId: request.threadId
309
+ }).catch((cause) => {
310
+ log("[segmentstream] draft_chat_unavailable", {
311
+ request: request.request,
312
+ cause
313
+ });
314
+ return [];
315
+ });
316
+ return [
317
+ ...chat.length === 0 ? [] : [`<chat_messages>\n[${chat.join(",\n")}]\n</chat_messages>`],
318
+ `<message>\n${messageLine(request)}\n</message>`,
319
+ ...request.note === void 0 ? [] : [`<note>\n${request.note}\n</note>`]
320
+ ];
321
+ }
322
+ function draftPrompt(request) {
323
+ return request.message.text !== null && request.message.text.trim() !== "" ? request.message.text : messageLine(request);
324
+ }
325
+ function messageLine(request) {
326
+ return JSON.stringify({
327
+ at: request.message.at,
328
+ text: request.message.text,
329
+ ...request.message.files.length === 0 ? {} : { files: request.message.files }
330
+ });
331
+ }
155
332
  const CALL_TIMEOUT_MS = 1e4;
156
333
  const FIRST_RETRY_MS = 1e3;
157
334
  const MAXIMUM_RETRY_MS = 3e4;
@@ -213,4 +390,4 @@ function agentRevisions(input) {
213
390
  }
214
391
  };
215
392
  }
216
- export { AGENT_SCOPE_HEADER, REVISION_AUTHENTICATOR, REVISION_ROUTE, REVISION_SCOPE, agentRevisions, eveSessionStream, revisionAddress, revisionContext, revisionOf, revisionPrincipal, revisionRequest, turnLookups };
393
+ export { AGENT_SCOPE_HEADER, REVISION_AUTHENTICATOR, REVISION_ROUTE, REVISION_SCOPE, agentRevisions, draftAddress, draftContext, draftPrincipal, draftPrompt, draftRequest, draftRequestOf, eveSessionStream, requestedDraft, requestedDraftKey, revisionAddress, revisionContext, revisionOf, revisionPrincipal, revisionRequest, turnLookups };
@@ -4,7 +4,7 @@ import { createRequire as __eveCreateRequire } from "node:module";
4
4
  const __filename = __eveFileURLToPath(import.meta.url);
5
5
  __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
- import { a as rolesOf } from "../../_chunks/principal-C1g8wCIg.mjs";
7
+ import { a as rolesOf } from "../../_chunks/principal-h5knGNwo.mjs";
8
8
  import { defineDynamic, defineSkill } from "eve/skills";
9
9
  function forRoles(roles, skill) {
10
10
  if (!Array.isArray(roles) || roles.length === 0 || !roles.every((role) => typeof role === "string" && role.trim() !== "")) throw new TypeError("forRoles() needs at least one role name; a skill for everyone is an ordinary skill file.");
@@ -4,4 +4,4 @@ import { createRequire as __eveCreateRequire } from "node:module";
4
4
  const __filename = __eveFileURLToPath(import.meta.url);
5
5
  __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
- export { wt as RUNTIME_SOURCE_PROTOCOL, Tt as compatibleRuntimeEnvelope, Et as principalRuntimeSource, Dt as readableRuntimeEnvelope, Ot as runtimeEnvelope, kt as telegramRuntimeSource } from "../../_chunks/principal-C1g8wCIg.mjs";
7
+ export { wt as RUNTIME_SOURCE_PROTOCOL, Tt as compatibleRuntimeEnvelope, Et as principalRuntimeSource, Dt as readableRuntimeEnvelope, Ot as runtimeEnvelope, kt as telegramRuntimeSource } from "../../_chunks/principal-h5knGNwo.mjs";
@@ -4,7 +4,7 @@ import { createRequire as __eveCreateRequire } from "node:module";
4
4
  const __filename = __eveFileURLToPath(import.meta.url);
5
5
  __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
- import { Pt as SESSION_HEADER, R as ACT_AS_HEADER, _ as AttachmentError, jt as CHAT_HEADER, v as EARLIER_CHAT_HEADER } from "../../_chunks/principal-C1g8wCIg.mjs";
7
+ import { Pt as SESSION_HEADER, R as ACT_AS_HEADER, _ as AttachmentError, jt as CHAT_HEADER, v as EARLIER_CHAT_HEADER } from "../../_chunks/principal-h5knGNwo.mjs";
8
8
  import { fetchFileGrant, transientFileStatus } from "./file-grant.mjs";
9
9
  import { ontologyDeploymentHeaders } from "./environment.mjs";
10
10
  var StoredFileError = class extends AttachmentError {
@@ -8,7 +8,7 @@ import { admitMessage, localizedText } from "../admission.mjs";
8
8
  import { agentToolsAttribute } from "../agent-tools.mjs";
9
9
  import { agentChats, channelChats } from "../chats.mjs";
10
10
  import { withButtonDecision } from "../confirmation-buttons.mjs";
11
- import { Vt as withChatAddress, b as agentAttachments, d as prepareInboundMedia, m as turnContent } from "../../../_chunks/principal-C1g8wCIg.mjs";
11
+ import { Vt as withChatAddress, b as agentAttachments, d as prepareInboundMedia, m as turnContent } from "../../../_chunks/principal-h5knGNwo.mjs";
12
12
  import { channelAttributes, currentChannel, withNamedRoutes, withSessionChannels } from "../channel-scope.mjs";
13
13
  import { redactDiagnostic } from "../diagnostics.mjs";
14
14
  import { MAXIMUM_DOWNLOAD_BYTES, connectionProxy } from "../connection-proxy.mjs";
@@ -4,7 +4,7 @@ import { createRequire as __eveCreateRequire } from "node:module";
4
4
  const __filename = __eveFileURLToPath(import.meta.url);
5
5
  __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
- import { _ as AttachmentError } from "../../../_chunks/principal-C1g8wCIg.mjs";
7
+ import { _ as AttachmentError } from "../../../_chunks/principal-h5knGNwo.mjs";
8
8
  import { sendStoredAttachments } from "../attachments-send.mjs";
9
9
  import { connectionProxy } from "../connection-proxy.mjs";
10
10
  import { redactDiagnostic } from "../diagnostics.mjs";
@@ -4,7 +4,7 @@ import { createRequire as __eveCreateRequire } from "node:module";
4
4
  const __filename = __eveFileURLToPath(import.meta.url);
5
5
  __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
- import { Ot as runtimeEnvelope, Rt as chatRuntimeSource, Vt as withChatAddress } from "../../../_chunks/principal-C1g8wCIg.mjs";
7
+ import { Ot as runtimeEnvelope, Rt as chatRuntimeSource, Vt as withChatAddress } from "../../../_chunks/principal-h5knGNwo.mjs";
8
8
  import { currentChannel } from "../channel-scope.mjs";
9
9
  import { pressWorkspaceButton, queueWorkspaceButtonTurn, workspaceAction, workspaceButtonToken } from "../workspace-action.mjs";
10
10
  import { pairingNotice } from "./pairing.mjs";
@@ -5,7 +5,7 @@ const __filename = __eveFileURLToPath(import.meta.url);
5
5
  __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
7
  import { object } from "./confirmation-description.mjs";
8
- import { D as OntologyFileUnavailable, W as member, i as memberIdOf, j as ontologyTools } from "../../_chunks/principal-C1g8wCIg.mjs";
8
+ import { D as OntologyFileUnavailable, W as member, i as memberIdOf, j as ontologyTools } from "../../_chunks/principal-h5knGNwo.mjs";
9
9
  import { redactDiagnostic } from "./diagnostics.mjs";
10
10
  import { createHash } from "node:crypto";
11
11
  async function readStoredFile(input, principal, options = {}) {
@@ -10,17 +10,17 @@ import { groupRoutingHealth } from "../group-routing/health.mjs";
10
10
  import { dispatchStructuredMessage, structuredMessage } from "./structured.mjs";
11
11
  import { handleWorkspaceCallback } from "./callbacks.mjs";
12
12
  import { telegramText, withTelegramTexts } from "./texts.mjs";
13
- import { t as agentBuild } from "../../../_chunks/build-metadata-DD8NyjVs.mjs";
13
+ import { t as agentBuild } from "../../../_chunks/build-metadata-BGQyCVyy.mjs";
14
14
  import { attachmentLifecycle } from "./lifecycle.mjs";
15
15
  import { manifestOf } from "../../config.mjs";
16
16
  import { gatewayAttachmentDescriber } from "./attachment-description.mjs";
17
17
  import { chooseModel } from "../../model.mjs";
18
- import { Ct as withDeliveryLocale, S as fetchStoredAttachment, St as safeTelegramFetch, b as agentAttachments, c as currentInboundRequest, l as runInboundRequest, mt as currentLocale, n as chatLanguage, o as telegramPrincipal, s as InboundRequest, u as withReplacedText, xt as reportTelegramError, yt as failureText } from "../../../_chunks/principal-C1g8wCIg.mjs";
18
+ import { Ct as withDeliveryLocale, S as fetchStoredAttachment, St as safeTelegramFetch, b as agentAttachments, c as currentInboundRequest, l as runInboundRequest, mt as currentLocale, n as chatLanguage, o as telegramPrincipal, s as InboundRequest, u as withReplacedText, xt as reportTelegramError, yt as failureText } from "../../../_chunks/principal-h5knGNwo.mjs";
19
19
  import { MAXIMUM_DOWNLOAD_BYTES, connectionProxy } from "../connection-proxy.mjs";
20
20
  import { appOrigin, channelsEnabled, proxyEnvironment, runtimeIdentityEnvironment, webhookSecret } from "../environment.mjs";
21
21
  import { agentIdentities } from "../identities.mjs";
22
22
  import { h as topicContext, r as chatArchive } from "../../../_chunks/chat-archive-DavfKJDI.mjs";
23
- import { a as captureTelegramFetch, h as telegramChatCapture, i as captureRouteDecider, s as chatIdentities, u as recordGateDecision } from "../../../_chunks/chat-archive-By3MnPEC.mjs";
23
+ import { a as captureTelegramFetch, h as telegramChatCapture, i as captureRouteDecider, s as chatIdentities, u as recordGateDecision } from "../../../_chunks/chat-archive-DwSKmO-f.mjs";
24
24
  import { runtimeTokenVerifier } from "../runtime-identity.mjs";
25
25
  import { runtimeToken } from "../runtime-token.mjs";
26
26
  import { botIdentityCache, proxiedBotRequest, runtimeBotIdentity } from "./bot.mjs";
@@ -39,7 +39,7 @@ import { TELEGRAM_PLACEHOLDER_TOKEN, TELEGRAM_PROXY_ORIGIN, telegramProxyFetch }
39
39
  import { healthRoute } from "./health.mjs";
40
40
  import { decisionRouter } from "../group-routing/router.mjs";
41
41
  import { scopedAddress } from "./sessions.mjs";
42
- import { a as isNoReplyCall, i as interimTexts, s as replyDelivery } from "../../../_chunks/silent-C9x3GcMg.mjs";
42
+ import { a as isNoReplyCall, i as interimTexts, s as replyDelivery } from "../../../_chunks/silent-CsgJLKrZ.mjs";
43
43
  import { channelReview, holdFilesAfterTurn } from "../review/reply.mjs";
44
44
  import { telegramSendScope } from "./send-queue.mjs";
45
45
  import { telegramFailureEvents } from "./turn-errors.mjs";
@@ -5,7 +5,7 @@ const __filename = __eveFileURLToPath(import.meta.url);
5
5
  __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
7
  import { describableImage } from "../inbound-media/images.mjs";
8
- import { xt as reportTelegramError } from "../../../_chunks/principal-C1g8wCIg.mjs";
8
+ import { xt as reportTelegramError } from "../../../_chunks/principal-h5knGNwo.mjs";
9
9
  import { gateway, generateText } from "ai";
10
10
  const MAXIMUM_ROUTING_ATTACHMENT_BYTES = 5242880;
11
11
  const ROUTING_ATTACHMENT_TIMEOUT_MS = 15e3;
@@ -5,7 +5,7 @@ const __filename = __eveFileURLToPath(import.meta.url);
5
5
  __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
7
  import { attachmentOwner } from "../attachment-tools.mjs";
8
- import { _ as AttachmentError, _t as customerMessage, xt as reportTelegramError, yt as failureText } from "../../../_chunks/principal-C1g8wCIg.mjs";
8
+ import { _ as AttachmentError, _t as customerMessage, xt as reportTelegramError, yt as failureText } from "../../../_chunks/principal-h5knGNwo.mjs";
9
9
  import { attachmentFailure } from "../attachments-send.mjs";
10
10
  import { connectionProxy } from "../connection-proxy.mjs";
11
11
  import { StoredFileError, fetchStoredFile } from "../sent-files.mjs";
@@ -4,7 +4,7 @@ import { createRequire as __eveCreateRequire } from "node:module";
4
4
  const __filename = __eveFileURLToPath(import.meta.url);
5
5
  __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
- import { Ot as runtimeEnvelope, c as currentInboundRequest, i as memberIdOf, kt as telegramRuntimeSource, o as telegramPrincipal, xt as reportTelegramError } from "../../../_chunks/principal-C1g8wCIg.mjs";
7
+ import { Ot as runtimeEnvelope, c as currentInboundRequest, i as memberIdOf, kt as telegramRuntimeSource, o as telegramPrincipal, xt as reportTelegramError } from "../../../_chunks/principal-h5knGNwo.mjs";
8
8
  import { formatAddress, parseAddress, scopedAddress } from "./sessions.mjs";
9
9
  import { telegramText } from "./texts.mjs";
10
10
  import { isWorkspaceCallback, pressWorkspaceButton, queueWorkspaceButtonTurn, workspaceAction, workspaceButtonToken } from "../workspace-action.mjs";
@@ -4,4 +4,4 @@ import { createRequire as __eveCreateRequire } from "node:module";
4
4
  const __filename = __eveFileURLToPath(import.meta.url);
5
5
  __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
- export { t as REVISION_CLAIM_TTL_MS, n as attachmentIdentity, r as attachmentRefs, i as captureRouteDecider, a as captureTelegramFetch, o as captureTelegramWebhook, s as chatIdentities, c as currentCapture, l as participants, u as recordGateDecision, d as recordInboundContent, f as recordRouteDecision, p as recordSessionFailure, m as registerCapture, h as telegramChatCapture } from "../../../_chunks/chat-archive-By3MnPEC.mjs";
7
+ export { t as REVISION_CLAIM_TTL_MS, n as attachmentIdentity, r as attachmentRefs, i as captureRouteDecider, a as captureTelegramFetch, o as captureTelegramWebhook, s as chatIdentities, c as currentCapture, l as participants, u as recordGateDecision, d as recordInboundContent, f as recordRouteDecision, p as recordSessionFailure, m as registerCapture, h as telegramChatCapture } from "../../../_chunks/chat-archive-DwSKmO-f.mjs";
@@ -5,7 +5,7 @@ const __filename = __eveFileURLToPath(import.meta.url);
5
5
  __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
7
  import { telegramText } from "./texts.mjs";
8
- import { F as confirmations, It as chatChannel, c as currentInboundRequest, i as memberIdOf, o as telegramPrincipal, xt as reportTelegramError } from "../../../_chunks/principal-C1g8wCIg.mjs";
8
+ import { F as confirmations, It as chatChannel, c as currentInboundRequest, i as memberIdOf, o as telegramPrincipal, xt as reportTelegramError } from "../../../_chunks/principal-h5knGNwo.mjs";
9
9
  import { humanText } from "../confirmation-description.mjs";
10
10
  import { withConfirmationPrompt } from "../group-routing/messages.mjs";
11
11
  import { chatPostOperationId, isChatPost } from "../chat-post-confirmation.mjs";
@@ -5,5 +5,5 @@ const __filename = __eveFileURLToPath(import.meta.url);
5
5
  __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
7
  import { isTechnicalText } from "../customer-text-safety.mjs";
8
- import { Ct as withDeliveryLocale, St as safeTelegramFetch, _t as customerMessage, bt as formattingRefused, gt as customerCopy, ht as currentThreadId, mt as currentLocale, pt as TelegramDeliveryError, vt as customerText, xt as reportTelegramError, yt as failureText } from "../../../_chunks/principal-C1g8wCIg.mjs";
8
+ import { Ct as withDeliveryLocale, St as safeTelegramFetch, _t as customerMessage, bt as formattingRefused, gt as customerCopy, ht as currentThreadId, mt as currentLocale, pt as TelegramDeliveryError, vt as customerText, xt as reportTelegramError, yt as failureText } from "../../../_chunks/principal-h5knGNwo.mjs";
9
9
  export { TelegramDeliveryError, currentLocale, currentThreadId, customerCopy, customerMessage, customerText, failureText, formattingRefused, isTechnicalText, reportTelegramError, safeTelegramFetch, withDeliveryLocale };
@@ -5,7 +5,7 @@ const __filename = __eveFileURLToPath(import.meta.url);
5
5
  __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
7
  import { currentChannel } from "../channel-scope.mjs";
8
- import { p as storeFiles, xt as reportTelegramError } from "../../../_chunks/principal-C1g8wCIg.mjs";
8
+ import { p as storeFiles, xt as reportTelegramError } from "../../../_chunks/principal-h5knGNwo.mjs";
9
9
  function telegramChat(chatId) {
10
10
  return `${currentChannel("telegram")}:${chatId}`;
11
11
  }
@@ -4,7 +4,7 @@ import { createRequire as __eveCreateRequire } from "node:module";
4
4
  const __filename = __eveFileURLToPath(import.meta.url);
5
5
  __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
- import { t as agentBuild } from "../../../_chunks/build-metadata-DD8NyjVs.mjs";
7
+ import { t as agentBuild } from "../../../_chunks/build-metadata-BGQyCVyy.mjs";
8
8
  import { runtimeRequestFailure } from "./runtime-request.mjs";
9
9
  import { GET } from "eve/channels";
10
10
  const HEALTH_ROUTE = "/eve/v1/telegram/health";
@@ -4,7 +4,7 @@ import { createRequire as __eveCreateRequire } from "node:module";
4
4
  const __filename = __eveFileURLToPath(import.meta.url);
5
5
  __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
- import { N as CONFIRMATION_TTL_MS } from "../../../_chunks/principal-C1g8wCIg.mjs";
7
+ import { N as CONFIRMATION_TTL_MS } from "../../../_chunks/principal-h5knGNwo.mjs";
8
8
  import { object } from "../confirmation-description.mjs";
9
9
  import { SessionNotActiveError } from "eve/sessions";
10
10
  function heldApprovals(events) {
@@ -4,4 +4,4 @@ import { createRequire as __eveCreateRequire } from "node:module";
4
4
  const __filename = __eveFileURLToPath(import.meta.url);
5
5
  __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
- export { s as InboundRequest, c as currentInboundRequest, l as runInboundRequest, u as withReplacedText } from "../../../_chunks/principal-C1g8wCIg.mjs";
7
+ export { s as InboundRequest, c as currentInboundRequest, l as runInboundRequest, u as withReplacedText } from "../../../_chunks/principal-h5knGNwo.mjs";
@@ -7,7 +7,7 @@ __eveCreateRequire(import.meta.url);
7
7
  import { WorkspaceActionAlreadyDispatched } from "../workspace-action.mjs";
8
8
  import { structuredMessage } from "./structured.mjs";
9
9
  import { currentChannel } from "../channel-scope.mjs";
10
- import { Ot as runtimeEnvelope, f as attachmentsContext, kt as telegramRuntimeSource, n as chatLanguage, o as telegramPrincipal, x as attachmentUrl, xt as reportTelegramError } from "../../../_chunks/principal-C1g8wCIg.mjs";
10
+ import { Ot as runtimeEnvelope, f as attachmentsContext, kt as telegramRuntimeSource, n as chatLanguage, o as telegramPrincipal, x as attachmentUrl, xt as reportTelegramError } from "../../../_chunks/principal-h5knGNwo.mjs";
11
11
  import { routingBurst } from "../group-routing/burst.mjs";
12
12
  import { telegramSignals } from "./signals.mjs";
13
13
  import { addressingReason, chatKey, otherRecipient } from "../group-routing/signals.mjs";
@@ -28,7 +28,7 @@ import { routingContext } from "./routing-context.mjs";
28
28
  import { formatAddress, messageAddress, scopedAddress } from "./sessions.mjs";
29
29
  import { voiceOf } from "./voice.mjs";
30
30
  import { MAXIMUM_ROUTING_ATTACHMENT_BYTES, describeRoutingAttachment, routingAttachmentDeadline } from "./attachment-description.mjs";
31
- import { d as recordInboundContent, f as recordRouteDecision, u as recordGateDecision } from "../../../_chunks/chat-archive-By3MnPEC.mjs";
31
+ import { d as recordInboundContent, f as recordRouteDecision, u as recordGateDecision } from "../../../_chunks/chat-archive-DwSKmO-f.mjs";
32
32
  import { contentShape, messageContent } from "./content.mjs";
33
33
  import { messageAudience } from "./audience.mjs";
34
34
  const MAXIMUM_QUOTE_LENGTH = 500;
@@ -4,8 +4,8 @@ import { createRequire as __eveCreateRequire } from "node:module";
4
4
  const __filename = __eveFileURLToPath(import.meta.url);
5
5
  __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
- import { E as OntologyActionNotPermitted, Et as principalRuntimeSource, L as needsConfirmation, Ot as runtimeEnvelope, W as member, c as currentInboundRequest, j as ontologyTools, k as actionToolName, kt as telegramRuntimeSource } from "../../../_chunks/principal-C1g8wCIg.mjs";
8
- import { t as agentBuild } from "../../../_chunks/build-metadata-DD8NyjVs.mjs";
7
+ import { E as OntologyActionNotPermitted, Et as principalRuntimeSource, L as needsConfirmation, Ot as runtimeEnvelope, W as member, c as currentInboundRequest, j as ontologyTools, k as actionToolName, kt as telegramRuntimeSource } from "../../../_chunks/principal-h5knGNwo.mjs";
8
+ import { t as agentBuild } from "../../../_chunks/build-metadata-BGQyCVyy.mjs";
9
9
  import { object } from "../confirmation-description.mjs";
10
10
  var AttachmentLifecycleNotPermitted = class extends Error {
11
11
  code = "attachment_lifecycle_not_permitted";
@@ -4,4 +4,4 @@ import { createRequire as __eveCreateRequire } from "node:module";
4
4
  const __filename = __eveFileURLToPath(import.meta.url);
5
5
  __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
- export { t as TELEGRAM_AUTHENTICATOR, n as chatLanguage, r as identityProviderOf, i as memberIdOf, a as rolesOf, o as telegramPrincipal } from "../../../_chunks/principal-C1g8wCIg.mjs";
7
+ export { t as TELEGRAM_AUTHENTICATOR, n as chatLanguage, r as identityProviderOf, i as memberIdOf, a as rolesOf, o as telegramPrincipal } from "../../../_chunks/principal-h5knGNwo.mjs";
@@ -6,7 +6,7 @@ __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
7
  import { agentMessage } from "../group-routing/messages.mjs";
8
8
  import "../group-routing/router.mjs";
9
- import { o as isSilentReply } from "../../../_chunks/silent-C9x3GcMg.mjs";
9
+ import { o as isSilentReply } from "../../../_chunks/silent-CsgJLKrZ.mjs";
10
10
  import { questionsFromHistory, routingConfirmationState, routingConfirmations } from "./confirmations.mjs";
11
11
  import { questionKey } from "../questions.mjs";
12
12
  import { archivedRoutingMessages } from "../group-routing/routing-context.mjs";
@@ -4,7 +4,7 @@ import { createRequire as __eveCreateRequire } from "node:module";
4
4
  const __filename = __eveFileURLToPath(import.meta.url);
5
5
  __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
- import { xt as reportTelegramError } from "../../../_chunks/principal-C1g8wCIg.mjs";
7
+ import { xt as reportTelegramError } from "../../../_chunks/principal-h5knGNwo.mjs";
8
8
  import { createHash } from "node:crypto";
9
9
  function strandedRun(error) {
10
10
  if (!(error instanceof Error) || error.name !== "RunKeyFetchError" || !("status" in error) || error.status !== 404) return;
@@ -4,4 +4,4 @@ import { createRequire as __eveCreateRequire } from "node:module";
4
4
  const __filename = __eveFileURLToPath(import.meta.url);
5
5
  __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
- export { t as INTERIM_TURNS, n as completionKind, r as deliverUnlessSilent, i as interimTexts, a as isNoReplyCall, o as isSilentReply, s as replyDelivery } from "../../../_chunks/silent-C9x3GcMg.mjs";
7
+ export { t as INTERIM_TURNS, n as completionKind, r as deliverUnlessSilent, i as interimTexts, a as isNoReplyCall, o as isSilentReply, s as replyDelivery } from "../../../_chunks/silent-CsgJLKrZ.mjs";
@@ -4,4 +4,4 @@ import { createRequire as __eveCreateRequire } from "node:module";
4
4
  const __filename = __eveFileURLToPath(import.meta.url);
5
5
  __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
- export { g as captureInStore, _ as storeSend } from "../../../_chunks/chat-archive-By3MnPEC.mjs";
7
+ export { g as captureInStore, _ as storeSend } from "../../../_chunks/chat-archive-DwSKmO-f.mjs";
@@ -4,7 +4,7 @@ import { createRequire as __eveCreateRequire } from "node:module";
4
4
  const __filename = __eveFileURLToPath(import.meta.url);
5
5
  __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
- import { Ot as runtimeEnvelope, kt as telegramRuntimeSource } from "../../../_chunks/principal-C1g8wCIg.mjs";
7
+ import { Ot as runtimeEnvelope, kt as telegramRuntimeSource } from "../../../_chunks/principal-h5knGNwo.mjs";
8
8
  import { workspaceAction } from "../workspace-action.mjs";
9
9
  import { STRUCTURED_KINDS } from "./structured-settings.mjs";
10
10
  const record = (value) => {