@agentsky/sky 2.11.0 → 2.13.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.
@@ -95,6 +95,8 @@ declare const agentAddonsSchema: z.ZodObject<{
95
95
  "meta.transcribe": "meta.transcribe";
96
96
  "minimax.tts": "minimax.tts";
97
97
  "elevenlabs.sound": "elevenlabs.sound";
98
+ "elevenlabs.tts": "elevenlabs.tts";
99
+ "elevenlabs.music": "elevenlabs.music";
98
100
  "zai.transcribe": "zai.transcribe";
99
101
  "openai.transcribe": "openai.transcribe";
100
102
  "fish-audio.tts": "fish-audio.tts";
@@ -235,6 +237,8 @@ declare const createProductAgentSchema: z.ZodObject<{
235
237
  "meta.transcribe": "meta.transcribe";
236
238
  "minimax.tts": "minimax.tts";
237
239
  "elevenlabs.sound": "elevenlabs.sound";
240
+ "elevenlabs.tts": "elevenlabs.tts";
241
+ "elevenlabs.music": "elevenlabs.music";
238
242
  "zai.transcribe": "zai.transcribe";
239
243
  "openai.transcribe": "openai.transcribe";
240
244
  "fish-audio.tts": "fish-audio.tts";
@@ -375,6 +379,8 @@ declare const prepareProductSessionSchema: z.ZodObject<{
375
379
  "meta.transcribe": "meta.transcribe";
376
380
  "minimax.tts": "minimax.tts";
377
381
  "elevenlabs.sound": "elevenlabs.sound";
382
+ "elevenlabs.tts": "elevenlabs.tts";
383
+ "elevenlabs.music": "elevenlabs.music";
378
384
  "zai.transcribe": "zai.transcribe";
379
385
  "openai.transcribe": "openai.transcribe";
380
386
  "fish-audio.tts": "fish-audio.tts";
package/dist/products.js CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  skillsArraySchema,
9
9
  systemMessageEventSchema,
10
10
  userMessageEventSchema
11
- } from "./chunk-WC7GJSAJ.js";
11
+ } from "./chunk-2IKEJ74C.js";
12
12
  import "./chunk-MLKGABMK.js";
13
13
 
14
14
  // ../../packages/spec/src/compatibility.ts
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  external_exports,
3
3
  messagePartSchema
4
- } from "./chunk-WC7GJSAJ.js";
4
+ } from "./chunk-2IKEJ74C.js";
5
5
  import "./chunk-MLKGABMK.js";
6
6
 
7
7
  // ../../packages/chat/src/stream.ts
@@ -97,6 +97,16 @@ var internalEventSchema = external_exports.object({
97
97
  * session.deleted) — emitted verbatim; the host already persisted it. */
98
98
  lifecycle: external_exports.object({ id: external_exports.string().min(1), type: external_exports.string().min(1) }).passthrough().optional()
99
99
  });
100
+ function personalContextForPod(body, supported) {
101
+ const { personal_context: grant, ...rest } = body;
102
+ if (!grant || supported) return body;
103
+ const text = `This runtime cannot receive the private personal-context credential file. Use this value instead, as X-Personal-Context on memory and context API requests and as ACTL_PERSONAL_CONTEXT for actl grep: ${grant}. Never print, persist or share it.`;
104
+ const parts = [...rest.parts, { type: "text", index: Math.max(-1, ...rest.parts.map((part) => part.index)) + 1, text }];
105
+ if (!rest.events) return { ...rest, parts };
106
+ const previous = rest.events.find((event) => event.type === "system.message");
107
+ const system = { type: "system.message", content: [{ type: "text", text: [...previous?.type === "system.message" ? previous.content.map((block) => block.text) : [], text].join("\n\n") }] };
108
+ return { ...rest, parts, events: [...rest.events.filter((event) => event.type !== "system.message"), system] };
109
+ }
100
110
  function podMessageBody(messageId, turn, resourcesRevision = 0) {
101
111
  if ("events" in turn) {
102
112
  const envelope = {
@@ -144,6 +154,7 @@ function classifyPodSendStatus(status, detail) {
144
154
  if (status >= 500) return { kind: "uncertain", reason: "server_error", status, detail };
145
155
  return { kind: "rejected", status, detail };
146
156
  }
157
+ var PERSONAL_CONTEXT_PODS = /* @__PURE__ */ new Set();
147
158
  async function sendPodMessage(baseUrl, body, options = {}) {
148
159
  const headers = {
149
160
  "content-type": "application/json",
@@ -152,6 +163,11 @@ async function sendPodMessage(baseUrl, body, options = {}) {
152
163
  if (options.idempotencyKey) headers["idempotency-key"] = options.idempotencyKey;
153
164
  let res;
154
165
  try {
166
+ if (body.personal_context && !PERSONAL_CONTEXT_PODS.has(baseUrl)) {
167
+ const health = await getPodHealth(baseUrl, options);
168
+ if (health.personalContext) PERSONAL_CONTEXT_PODS.add(baseUrl);
169
+ else if (health.ok) body = personalContextForPod(body, false);
170
+ }
155
171
  const user = body.events?.find((event) => event.type === "user.message");
156
172
  const mode = user?.type === "user.message" ? user.interaction_mode : body.interaction_mode;
157
173
  if (mode) {
@@ -197,7 +213,8 @@ async function getPodHealth(baseUrl, options = {}) {
197
213
  status: res.status,
198
214
  state: typeof body.state === "string" ? body.state : void 0,
199
215
  openMessageId: typeof open === "string" && open ? open : null,
200
- interactionModes: Array.isArray(body.interaction_modes) ? body.interaction_modes.filter((mode) => mode === "plan" || mode === "build") : void 0
216
+ interactionModes: Array.isArray(body.interaction_modes) ? body.interaction_modes.filter((mode) => mode === "plan" || mode === "build") : void 0,
217
+ personalContext: body.personal_context === true
201
218
  };
202
219
  } catch {
203
220
  return { ok: false, openMessageId: null };
@@ -295,6 +312,7 @@ export {
295
312
  interruptSession,
296
313
  legacyPartsOf,
297
314
  parseSseStream,
315
+ personalContextForPod,
298
316
  podMessageBody,
299
317
  postSessionEvents,
300
318
  sendPodMessage,
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  USER_AGENT,
3
3
  configPath
4
- } from "./chunk-RWPPIEHH.js";
4
+ } from "./chunk-Z3FPPGWX.js";
5
5
  import {
6
6
  TRACE_CONTENT_SCOPES,
7
7
  redactTraceText
8
- } from "./chunk-WC7GJSAJ.js";
8
+ } from "./chunk-2IKEJ74C.js";
9
9
  import "./chunk-MLKGABMK.js";
10
10
 
11
11
  // src/trace.ts