@agentsky/sky 2.9.1 → 2.10.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.
@@ -89,7 +89,6 @@ declare const agentAddonsSchema: z.ZodObject<{
89
89
  "googlemap.geocode": "googlemap.geocode";
90
90
  "googlemap.places": "googlemap.places";
91
91
  "agentmail.list-inboxes": "agentmail.list-inboxes";
92
- "social-boost.catalog": "social-boost.catalog";
93
92
  "tinyfish.search": "tinyfish.search";
94
93
  "tinyfish.profile-list": "tinyfish.profile-list";
95
94
  "meta.transcribe": "meta.transcribe";
@@ -101,6 +100,14 @@ declare const agentAddonsSchema: z.ZodObject<{
101
100
  "google.image": "google.image";
102
101
  "openai.image-2.5": "openai.image-2.5";
103
102
  "wan.image": "wan.image";
103
+ "logo.lookup": "logo.lookup";
104
+ "openmeteo.weather": "openmeteo.weather";
105
+ "frankfurter.fx": "frankfurter.fx";
106
+ "dictionary.define": "dictionary.define";
107
+ "openlibrary.search": "openlibrary.search";
108
+ "googledns.resolve": "googledns.resolve";
109
+ "qrserver.create": "qrserver.create";
110
+ "social-boost.catalog": "social-boost.catalog";
104
111
  }>, unknown>>>>;
105
112
  model: z.ZodOptional<z.ZodString>;
106
113
  reasoning_effort: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
@@ -221,7 +228,6 @@ declare const createProductAgentSchema: z.ZodObject<{
221
228
  "googlemap.geocode": "googlemap.geocode";
222
229
  "googlemap.places": "googlemap.places";
223
230
  "agentmail.list-inboxes": "agentmail.list-inboxes";
224
- "social-boost.catalog": "social-boost.catalog";
225
231
  "tinyfish.search": "tinyfish.search";
226
232
  "tinyfish.profile-list": "tinyfish.profile-list";
227
233
  "meta.transcribe": "meta.transcribe";
@@ -233,6 +239,14 @@ declare const createProductAgentSchema: z.ZodObject<{
233
239
  "google.image": "google.image";
234
240
  "openai.image-2.5": "openai.image-2.5";
235
241
  "wan.image": "wan.image";
242
+ "logo.lookup": "logo.lookup";
243
+ "openmeteo.weather": "openmeteo.weather";
244
+ "frankfurter.fx": "frankfurter.fx";
245
+ "dictionary.define": "dictionary.define";
246
+ "openlibrary.search": "openlibrary.search";
247
+ "googledns.resolve": "googledns.resolve";
248
+ "qrserver.create": "qrserver.create";
249
+ "social-boost.catalog": "social-boost.catalog";
236
250
  }>, unknown>>>>;
237
251
  model: z.ZodOptional<z.ZodString>;
238
252
  reasoning_effort: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
@@ -353,7 +367,6 @@ declare const prepareProductSessionSchema: z.ZodObject<{
353
367
  "googlemap.geocode": "googlemap.geocode";
354
368
  "googlemap.places": "googlemap.places";
355
369
  "agentmail.list-inboxes": "agentmail.list-inboxes";
356
- "social-boost.catalog": "social-boost.catalog";
357
370
  "tinyfish.search": "tinyfish.search";
358
371
  "tinyfish.profile-list": "tinyfish.profile-list";
359
372
  "meta.transcribe": "meta.transcribe";
@@ -365,6 +378,14 @@ declare const prepareProductSessionSchema: z.ZodObject<{
365
378
  "google.image": "google.image";
366
379
  "openai.image-2.5": "openai.image-2.5";
367
380
  "wan.image": "wan.image";
381
+ "logo.lookup": "logo.lookup";
382
+ "openmeteo.weather": "openmeteo.weather";
383
+ "frankfurter.fx": "frankfurter.fx";
384
+ "dictionary.define": "dictionary.define";
385
+ "openlibrary.search": "openlibrary.search";
386
+ "googledns.resolve": "googledns.resolve";
387
+ "qrserver.create": "qrserver.create";
388
+ "social-boost.catalog": "social-boost.catalog";
368
389
  }>, unknown>>>>;
369
390
  model: z.ZodOptional<z.ZodString>;
370
391
  reasoning_effort: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
@@ -442,6 +463,10 @@ declare const runEventsSchema: z.ZodObject<{
442
463
  title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
443
464
  context: z.ZodOptional<z.ZodNullable<z.ZodString>>;
444
465
  }, z.core.$strict>], "type">>;
466
+ interaction_mode: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
467
+ plan: "plan";
468
+ build: "build";
469
+ }>>>;
445
470
  }, z.core.$strict>, z.ZodObject<{
446
471
  type: z.ZodLiteral<"system.message">;
447
472
  content: z.ZodArray<z.ZodObject<{
package/dist/products.js CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  skillsArraySchema,
9
9
  systemMessageEventSchema,
10
10
  userMessageEventSchema
11
- } from "./chunk-YN7PUNIB.js";
11
+ } from "./chunk-5QRKU3BR.js";
12
12
 
13
13
  // ../../packages/spec/src/compatibility.ts
14
14
  var capabilityInputsSchema = capabilitiesSchema;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  external_exports,
3
3
  messagePartSchema
4
- } from "./chunk-YN7PUNIB.js";
4
+ } from "./chunk-5QRKU3BR.js";
5
5
 
6
6
  // ../../packages/chat/src/stream.ts
7
7
  async function* parseSseStream(body) {
@@ -151,6 +151,26 @@ async function sendPodMessage(baseUrl, body, options = {}) {
151
151
  if (options.idempotencyKey) headers["idempotency-key"] = options.idempotencyKey;
152
152
  let res;
153
153
  try {
154
+ const user = body.events?.find((event) => event.type === "user.message");
155
+ const mode = user?.type === "user.message" ? user.interaction_mode : body.interaction_mode;
156
+ if (mode) {
157
+ const health = await getPodHealth(baseUrl, options);
158
+ if (!health.ok) return { kind: "undelivered", reason: "unreachable", status: health.status, detail: "Planning protocol could not be observed before delivery" };
159
+ if (!health.interactionModes?.includes(mode)) {
160
+ const events = body.events?.map((event) => {
161
+ if (event.type !== "user.message") return event;
162
+ const { interaction_mode: _mode, ...legacy } = event;
163
+ return legacy;
164
+ }) ?? [];
165
+ const context = mode === "plan" ? "Interaction mode: plan. Investigate and return a reviewable plan. Do not implement, edit files, run mutating commands or cause external side effects. Wait for an explicit implementation choice." : "Interaction mode: build. Respond to the current request normally; the previous planning-only restriction no longer applies. Preserve all applicable permissions and approvals.";
166
+ const previous = events.find((event) => event.type === "system.message");
167
+ const content = [...previous?.type === "system.message" ? previous.content : [], { type: "text", text: context }];
168
+ const system = { type: "system.message", content: [{ type: "text", text: content.map((block) => block.text).join("\n\n") }] };
169
+ const forwarded = [...events.filter((event) => event.type !== "system.message"), system];
170
+ const { interaction_mode: _legacyMode, ...compatible } = body;
171
+ body = body.events ? { ...compatible, events: forwarded, parts: legacyPartsOf({ events: forwarded }) } : { ...compatible, parts: [...body.parts, { type: "text", index: body.parts.length, text: context }] };
172
+ }
173
+ }
154
174
  res = await fetch(`${baseUrl}/messages`, {
155
175
  method: "POST",
156
176
  headers,
@@ -175,7 +195,8 @@ async function getPodHealth(baseUrl, options = {}) {
175
195
  ok: res.ok,
176
196
  status: res.status,
177
197
  state: typeof body.state === "string" ? body.state : void 0,
178
- openMessageId: typeof open === "string" && open ? open : null
198
+ openMessageId: typeof open === "string" && open ? open : null,
199
+ interactionModes: Array.isArray(body.interaction_modes) ? body.interaction_modes.filter((mode) => mode === "plan" || mode === "build") : void 0
179
200
  };
180
201
  } catch {
181
202
  return { ok: false, openMessageId: null };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentsky/sky",
3
- "version": "2.9.1",
3
+ "version": "2.10.0",
4
4
  "description": "sky — the AgentSky developer CLI: launch and talk to long-lived agents from your terminal.",
5
5
  "license": "MIT",
6
6
  "type": "module",