@finalai/agent-definition 0.5.1 → 0.6.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 (90) hide show
  1. package/HOSTING.md +4 -4
  2. package/THIRD_PARTY_NOTICES.md +1 -1
  3. package/dist/compiler-assets/{chunk-FU5VHNO4.ts → chunk-3R7MNW5L.ts} +1 -1
  4. package/dist/compiler-assets/{chunk-7KPWSOMK.ts → chunk-3SDZJK7K.ts} +1 -1
  5. package/dist/compiler-assets/{chunk-KTXTYIF4.ts → chunk-4A4EQHYK.ts} +57 -20
  6. package/dist/compiler-assets/{chunk-LZSLGWS7.ts → chunk-4MJF3ALN.ts} +5 -5
  7. package/dist/compiler-assets/{chunk-QVHDGZAN.ts → chunk-4T2URCJZ.ts} +2 -2
  8. package/dist/compiler-assets/{chunk-7MDGEPFT.ts → chunk-6K3WO73F.ts} +1 -1
  9. package/dist/compiler-assets/{chunk-KMBQVNAJ.ts → chunk-AMYJRTAC.ts} +3 -3
  10. package/dist/compiler-assets/{chunk-4T2XPIPH.ts → chunk-BHNF7BEJ.ts} +86 -17
  11. package/dist/compiler-assets/{chunk-U3MFLFVF.ts → chunk-CORCFNEY.ts} +3 -3
  12. package/dist/compiler-assets/{chunk-4ERFBLH7.ts → chunk-DRHDNSCQ.ts} +4 -4
  13. package/dist/compiler-assets/{chunk-O3JKMLDP.ts → chunk-EKR4AEM5.ts} +3 -3
  14. package/dist/compiler-assets/{chunk-MBX6PIN7.ts → chunk-FE7PIPSW.ts} +57 -10
  15. package/dist/compiler-assets/{chunk-YEKSPL76.ts → chunk-FFI2K5IJ.ts} +4 -4
  16. package/dist/compiler-assets/{chunk-36MVFRMA.ts → chunk-IZJMGIAH.ts} +2 -2
  17. package/dist/compiler-assets/{chunk-KTBNDKGJ.ts → chunk-JZTF36V2.ts} +2 -1
  18. package/dist/compiler-assets/{chunk-XJNO7EHQ.ts → chunk-KNYB36DW.ts} +2 -2
  19. package/dist/compiler-assets/{chunk-O2JWY454.ts → chunk-L7YJCQVB.ts} +4 -4
  20. package/dist/compiler-assets/{chunk-WJPAUIVM.ts → chunk-LGGJ6S3U.ts} +1 -1
  21. package/dist/compiler-assets/{chunk-BMX2HP6G.ts → chunk-LIRONA4O.ts} +6 -6
  22. package/dist/compiler-assets/{chunk-GIRUQ7QF.ts → chunk-MM4JCZSK.ts} +7 -7
  23. package/dist/compiler-assets/{chunk-VI5WBWUX.ts → chunk-MPZMRU56.ts} +4 -4
  24. package/dist/compiler-assets/chunk-PLQKTBKO.ts +27 -0
  25. package/dist/compiler-assets/{chunk-EAEQQT33.ts → chunk-Q26ZPNVB.ts} +25 -9
  26. package/dist/compiler-assets/{chunk-Z7HGOUC2.ts → chunk-RTC7AJBS.ts} +1 -1
  27. package/dist/compiler-assets/{chunk-OX46N5EP.ts → chunk-TCXQ4GLM.ts} +1 -1
  28. package/dist/compiler-assets/{chunk-R4IHPPTB.ts → chunk-UUQAHJRT.ts} +2 -2
  29. package/dist/compiler-assets/{chunk-KNFPKVUS.ts → chunk-XCX6VAK7.ts} +1 -1
  30. package/dist/compiler-assets/{chunk-OBFQTLWC.ts → chunk-Y73DOSSB.ts} +3 -3
  31. package/dist/compiler-assets/{chunk-VRW24MOJ.ts → chunk-YAO6DUQO.ts} +4 -4
  32. package/dist/compiler-assets/src/authoring/agent.ts +4 -4
  33. package/dist/compiler-assets/src/authoring/approval.ts +7 -7
  34. package/dist/compiler-assets/src/authoring/brand.ts +3 -3
  35. package/dist/compiler-assets/src/authoring/channels.ts +6 -8
  36. package/dist/compiler-assets/src/authoring/connections.ts +11 -11
  37. package/dist/compiler-assets/src/authoring/credentials.ts +7 -7
  38. package/dist/compiler-assets/src/authoring/dynamic.ts +8 -8
  39. package/dist/compiler-assets/src/authoring/harness.ts +9 -9
  40. package/dist/compiler-assets/src/authoring/hooks.ts +10 -10
  41. package/dist/compiler-assets/src/authoring/index.ts +27 -26
  42. package/dist/compiler-assets/src/authoring/instructions.ts +9 -9
  43. package/dist/compiler-assets/src/authoring/sandbox.ts +11 -11
  44. package/dist/compiler-assets/src/authoring/schedules.ts +4 -4
  45. package/dist/compiler-assets/src/authoring/skills.ts +4 -4
  46. package/dist/compiler-assets/src/authoring/tools.ts +9 -9
  47. package/dist/compiler-assets/src/compatibility.ts +6 -6
  48. package/dist/compiler-assets/src/hosted-bindings.ts +6 -6
  49. package/dist/compiler-assets/src/index.ts +28 -27
  50. package/dist/compiler-assets/src/manifest.ts +4 -4
  51. package/dist/compiler-assets/src/resolve.ts +5 -5
  52. package/dist/compiler-assets/src/runtime/bundle.ts +17 -18
  53. package/dist/compiler-assets/src/runtime/describe.ts +14 -14
  54. package/dist/compiler-assets/src/runtime/described.ts +28 -16
  55. package/dist/compiler-assets/src/runtime/isolate.ts +16 -17
  56. package/dist/compiler-assets/src/runtime/lower.ts +13 -13
  57. package/dist/compiler-assets/src/runtime/schema-validation.ts +4 -4
  58. package/dist/compiler-assets/src/runtime/values.ts +2 -2
  59. package/dist/modules/authoring/agent.d.mts +25 -1
  60. package/dist/modules/authoring/agent.mjs.map +2 -2
  61. package/dist/modules/authoring/brand.d.mts +1 -0
  62. package/dist/modules/authoring/brand.mjs +1 -0
  63. package/dist/modules/authoring/brand.mjs.map +2 -2
  64. package/dist/modules/authoring/channels.d.mts +13 -96
  65. package/dist/modules/authoring/channels.mjs +6 -52
  66. package/dist/modules/authoring/channels.mjs.map +3 -3
  67. package/dist/modules/authoring/index.d.mts +1 -1
  68. package/dist/modules/authoring/index.mjs +2 -0
  69. package/dist/modules/authoring/index.mjs.map +2 -2
  70. package/dist/modules/compiler/assemble.d.mts +0 -4
  71. package/dist/modules/compiler/assemble.mjs +55 -23
  72. package/dist/modules/compiler/assemble.mjs.map +2 -2
  73. package/dist/modules/compiler/bundle.mjs.map +1 -1
  74. package/dist/modules/compiler/index.d.mts +1 -4
  75. package/dist/modules/compiler/index.mjs +4 -3
  76. package/dist/modules/compiler/index.mjs.map +2 -2
  77. package/dist/modules/runtime/describe.mjs +49 -2
  78. package/dist/modules/runtime/describe.mjs.map +2 -2
  79. package/dist/modules/runtime/described.d.mts +94 -3
  80. package/dist/modules/runtime/described.mjs +14 -2
  81. package/dist/modules/runtime/described.mjs.map +2 -2
  82. package/dist/modules/runtime/isolate.d.mts +3 -2
  83. package/dist/modules/runtime/isolate.mjs +2 -0
  84. package/dist/modules/runtime/isolate.mjs.map +2 -2
  85. package/fixtures/release-scout/agent/channels/github.ts +2 -38
  86. package/fixtures/release-scout/agent/hooks/audit.ts +1 -1
  87. package/fixtures/release-scout/agent/instructions/org-context.ts +1 -1
  88. package/package.json +4 -4
  89. package/dist/compiler-assets/chunk-ISYIPH2T.ts +0 -120
  90. package/dist/compiler-assets/chunk-JRKGCYWA.ts +0 -87
@@ -13,25 +13,27 @@ import {
13
13
  note,
14
14
  sandboxProviderNameOf,
15
15
  toJson
16
- } from "./chunk-GIRUQ7QF.ts";
16
+ } from "./chunk-MM4JCZSK.ts";
17
17
  import {
18
18
  AGENT_DYNAMIC_PREFIX,
19
19
  namedExportName
20
20
  } from "./chunk-NMYHO2QN.ts";
21
21
  import {
22
- agentAvatarSchema
23
- } from "./chunk-EAEQQT33.ts";
22
+ agentAvatarSchema,
23
+ channelCredentialsSchema,
24
+ channelSurfaceSchema
25
+ } from "./chunk-Q26ZPNVB.ts";
24
26
  import {
25
27
  hostedBindingRequirementSchema
26
- } from "./chunk-R4IHPPTB.ts";
28
+ } from "./chunk-UUQAHJRT.ts";
27
29
  import {
28
30
  jsonValueSchema
29
- } from "./chunk-FU5VHNO4.ts";
31
+ } from "./chunk-3R7MNW5L.ts";
30
32
  import {
31
33
  authoredKindOf,
32
34
  pendingEntries,
33
35
  pendingExportName
34
- } from "./chunk-KTBNDKGJ.ts";
36
+ } from "./chunk-JZTF36V2.ts";
35
37
  import {
36
38
  entriesOf,
37
39
  fieldOf,
@@ -42,11 +44,11 @@ import {
42
44
  isString,
43
45
  messageOf,
44
46
  stringOrNull
45
- } from "./chunk-OX46N5EP.ts";
47
+ } from "./chunk-TCXQ4GLM.ts";
46
48
  import {
47
49
  array,
48
50
  string
49
- } from "./chunk-KTXTYIF4.ts";
51
+ } from "./chunk-4A4EQHYK.ts";
50
52
 
51
53
  // src/runtime/describe.ts
52
54
  var describeDynamic = (value) => {
@@ -218,6 +220,32 @@ var describeAvatar = (value, issues) => {
218
220
  }
219
221
  return null;
220
222
  };
223
+ var invalidChannelFields = (value) => {
224
+ const invalid = [];
225
+ if (!string().min(1).safeParse(fieldOf(value, "name")).success) invalid.push("name");
226
+ if (!channelCredentialsSchema.safeParse(fieldOf(value, "credentials")).success)
227
+ invalid.push("credentials");
228
+ const identity = fieldOf(value, "identity");
229
+ const kind = fieldOf(identity, "kind");
230
+ if (kind !== "none" && kind !== "redirect" && kind !== "challenge" || kind === "redirect" && !isCallable(fieldOf(identity, "start")) || kind === "challenge" && !isCallable(fieldOf(identity, "deliver")))
231
+ invalid.push("identity");
232
+ if (!array(string()).safeParse(fieldOf(fieldOf(value, "places"), "kinds")).success)
233
+ invalid.push("places");
234
+ if (!isCallable(fieldOf(value, "receive"))) invalid.push("receive");
235
+ return invalid;
236
+ };
237
+ var channelSurfaceOf = (value) => {
238
+ const routes = fieldOf(value, "routes");
239
+ const listeners = fieldOf(value, "listeners");
240
+ return {
241
+ routes: Array.isArray(routes) ? routes.map((route) => ({
242
+ method: String(fieldOf(route, "method")),
243
+ path: String(fieldOf(route, "path"))
244
+ })) : [],
245
+ listeners: Array.isArray(listeners) ? listeners.map((listener) => String(fieldOf(listener, "key"))) : [],
246
+ placeKinds: array(string()).safeParse(fieldOf(fieldOf(value, "places"), "kinds")).data ?? []
247
+ };
248
+ };
221
249
  var describeAgent = (value, ctx, issues) => {
222
250
  if (value == null) return null;
223
251
  if (!isPlainObject(value)) {
@@ -241,7 +269,12 @@ var describeAgent = (value, ctx, issues) => {
241
269
  if (Array.isArray(channelsRaw)) {
242
270
  channels = channelsRaw.map((binding, index) => ({
243
271
  key: stringOrNull(fieldOf(binding, "key")),
244
- channel: toJson(fieldOf(binding, "channel") ?? null, {
272
+ install: stringOrNull(fieldOf(binding, "install")),
273
+ credentials: channelCredentialsSchema.safeParse(fieldOf(binding, "credentials")).data ?? null,
274
+ surface: channelSurfaceSchema.safeParse(
275
+ fieldOf(binding, "surface") ?? (fieldOf(binding, "places") == null ? null : channelSurfaceOf(binding))
276
+ ).data ?? null,
277
+ channel: toJson(fieldOf(binding, "channel") ?? fieldOf(binding, "installed") ?? null, {
245
278
  path: `channels[${index}].channel`,
246
279
  issues
247
280
  }),
@@ -426,7 +459,21 @@ var describeModuleValue = (entry, ctx, sandbox, issues) => {
426
459
  method: String(fieldOf(route, "method")),
427
460
  path: String(fieldOf(route, "path"))
428
461
  })) : [],
429
- turnPolicy: stringOrNull(fieldOf(value, "turnPolicy")),
462
+ room: authoredKindOf(value) === "room-surface" /* RoomSurface */,
463
+ invalidFields: authoredKindOf(value) === "room-surface" /* RoomSurface */ || fieldOf(value, "disabled") === true ? [] : invalidChannelFields(value),
464
+ credentials: channelCredentialsSchema.safeParse(fieldOf(value, "credentials")).data ?? {
465
+ app: null
466
+ },
467
+ surface: {
468
+ routes: Array.isArray(routes) ? routes.map((route) => ({
469
+ method: String(fieldOf(route, "method")),
470
+ path: String(fieldOf(route, "path"))
471
+ })) : [],
472
+ listeners: Array.isArray(fieldOf(value, "listeners")) ? entriesOf(fieldOf(value, "listeners")).map(
473
+ ([, listener]) => String(fieldOf(listener, "key"))
474
+ ) : [],
475
+ placeKinds: array(string()).safeParse(fieldOf(fieldOf(value, "places"), "kinds")).data ?? []
476
+ },
430
477
  config: toJson(fieldOf(value, "config") ?? {}, { path: `${layout.path} config`, issues })
431
478
  };
432
479
  }
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  BaseCapability,
3
3
  providerRefSchema
4
- } from "./chunk-EAEQQT33.ts";
4
+ } from "./chunk-Q26ZPNVB.ts";
5
5
  import {
6
6
  CredentialDelivery,
7
7
  InferenceCredentialKind
8
- } from "./chunk-QVHDGZAN.ts";
8
+ } from "./chunk-4T2URCJZ.ts";
9
9
  import {
10
10
  jsonObjectSchema,
11
11
  jsonSchemaSchema
12
- } from "./chunk-FU5VHNO4.ts";
12
+ } from "./chunk-3R7MNW5L.ts";
13
13
  import {
14
14
  array,
15
15
  boolean,
@@ -22,7 +22,7 @@ import {
22
22
  record,
23
23
  string,
24
24
  union
25
- } from "./chunk-KTXTYIF4.ts";
25
+ } from "./chunk-4A4EQHYK.ts";
26
26
 
27
27
  // ../agent-provider/src/schemas.ts
28
28
  var SCHEMA_IDS = {
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  validateHostedBindingRequirements
3
- } from "./chunk-XJNO7EHQ.ts";
3
+ } from "./chunk-KNYB36DW.ts";
4
4
  import {
5
5
  stamp
6
- } from "./chunk-KTBNDKGJ.ts";
6
+ } from "./chunk-JZTF36V2.ts";
7
7
 
8
8
  // src/authoring/dynamic.ts
9
9
  var defineDynamic = (definition) => {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  isObjectLike
3
- } from "./chunk-OX46N5EP.ts";
3
+ } from "./chunk-TCXQ4GLM.ts";
4
4
 
5
5
  // src/authoring/brand.ts
6
6
  var AuthoredKind = /* @__PURE__ */ ((AuthoredKind2) => {
@@ -16,6 +16,7 @@ var AuthoredKind = /* @__PURE__ */ ((AuthoredKind2) => {
16
16
  AuthoredKind2["HarnessHost"] = "harness-host";
17
17
  AuthoredKind2["Hook"] = "hook";
18
18
  AuthoredKind2["Channel"] = "channel";
19
+ AuthoredKind2["RoomSurface"] = "room-surface";
19
20
  AuthoredKind2["Approval"] = "approval";
20
21
  return AuthoredKind2;
21
22
  })(AuthoredKind || {});
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  jsonSchemaError
3
- } from "./chunk-O3JKMLDP.ts";
3
+ } from "./chunk-EKR4AEM5.ts";
4
4
  import {
5
5
  findDynamicSlots,
6
6
  requireHostedBinding
7
- } from "./chunk-R4IHPPTB.ts";
7
+ } from "./chunk-UUQAHJRT.ts";
8
8
 
9
9
  // src/hosted-bindings.ts
10
10
  var validateHostedBindings = async (options) => {
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  ToolApproval
3
- } from "./chunk-EAEQQT33.ts";
3
+ } from "./chunk-Q26ZPNVB.ts";
4
4
  import {
5
5
  authoredKindOf,
6
6
  stamp
7
- } from "./chunk-KTBNDKGJ.ts";
7
+ } from "./chunk-JZTF36V2.ts";
8
8
  import {
9
9
  callableSchema
10
- } from "./chunk-OX46N5EP.ts";
10
+ } from "./chunk-TCXQ4GLM.ts";
11
11
  import {
12
12
  nativeEnum,
13
13
  object,
14
14
  string
15
- } from "./chunk-KTXTYIF4.ts";
15
+ } from "./chunk-4A4EQHYK.ts";
16
16
 
17
17
  // src/authoring/approval.ts
18
18
  var policy = (value, note = null) => stamp({ policy: value, note }, "approval" /* Approval */);
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  stamp
3
- } from "./chunk-KTBNDKGJ.ts";
3
+ } from "./chunk-JZTF36V2.ts";
4
4
 
5
5
  // src/authoring/instructions.ts
6
6
  var defineInstructions = (definition) => stamp(
@@ -1,24 +1,24 @@
1
1
  import {
2
2
  mcpAuthSchema
3
- } from "./chunk-EAEQQT33.ts";
3
+ } from "./chunk-Q26ZPNVB.ts";
4
4
  import {
5
5
  defineDynamic
6
- } from "./chunk-36MVFRMA.ts";
6
+ } from "./chunk-IZJMGIAH.ts";
7
7
  import {
8
8
  requireHostedBinding
9
- } from "./chunk-R4IHPPTB.ts";
9
+ } from "./chunk-UUQAHJRT.ts";
10
10
  import {
11
11
  jsonObjectSchema
12
- } from "./chunk-FU5VHNO4.ts";
12
+ } from "./chunk-3R7MNW5L.ts";
13
13
  import {
14
14
  stamp
15
- } from "./chunk-KTBNDKGJ.ts";
15
+ } from "./chunk-JZTF36V2.ts";
16
16
  import {
17
17
  record,
18
18
  strictObject,
19
19
  string,
20
20
  toJSONSchema
21
- } from "./chunk-KTXTYIF4.ts";
21
+ } from "./chunk-4A4EQHYK.ts";
22
22
 
23
23
  // src/authoring/connections.ts
24
24
  var defineMcpClientConnection = (definition) => stamp({ ...definition }, "connection" /* Connection */);
@@ -1,20 +1,20 @@
1
1
  import {
2
2
  toolLabelSchema
3
- } from "./chunk-4ERFBLH7.ts";
3
+ } from "./chunk-DRHDNSCQ.ts";
4
4
  import {
5
5
  lowerApproval
6
- } from "./chunk-O2JWY454.ts";
6
+ } from "./chunk-L7YJCQVB.ts";
7
7
  import {
8
8
  toolAnnotationSelectorSchema
9
- } from "./chunk-EAEQQT33.ts";
9
+ } from "./chunk-Q26ZPNVB.ts";
10
10
  import {
11
11
  jsonSchemaDeclarationError
12
- } from "./chunk-O3JKMLDP.ts";
12
+ } from "./chunk-EKR4AEM5.ts";
13
13
  import {
14
14
  authoredKindOf,
15
15
  pendingExportName,
16
16
  pendingIndexOf
17
- } from "./chunk-KTBNDKGJ.ts";
17
+ } from "./chunk-JZTF36V2.ts";
18
18
  import {
19
19
  authoredRecordSchema,
20
20
  authoredValueSchema,
@@ -29,7 +29,7 @@ import {
29
29
  isString,
30
30
  messageOf,
31
31
  optionalValueSchema
32
- } from "./chunk-OX46N5EP.ts";
32
+ } from "./chunk-TCXQ4GLM.ts";
33
33
  import {
34
34
  ZodType,
35
35
  array,
@@ -43,7 +43,7 @@ import {
43
43
  union,
44
44
  unknown,
45
45
  url
46
- } from "./chunk-KTXTYIF4.ts";
46
+ } from "./chunk-4A4EQHYK.ts";
47
47
 
48
48
  // ../agent-provider/src/tool-patterns.ts
49
49
  var TOOL_PATTERN_WILDCARD = "*";
@@ -17,12 +17,12 @@ import {
17
17
  _isoDateTime,
18
18
  _isoDuration,
19
19
  _isoTime
20
- } from "./chunk-KTXTYIF4.ts";
20
+ } from "./chunk-4A4EQHYK.ts";
21
21
  import {
22
22
  __export
23
23
  } from "./chunk-32O3ODZE.ts";
24
24
 
25
- // ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/compat.js
25
+ // ../../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/classic/compat.js
26
26
  var ZodIssueCode = {
27
27
  invalid_type: "invalid_type",
28
28
  too_big: "too_big",
@@ -40,7 +40,7 @@ var ZodFirstPartyTypeKind;
40
40
  /* @__PURE__ */ (function(ZodFirstPartyTypeKind2) {
41
41
  })(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));
42
42
 
43
- // ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/iso.js
43
+ // ../../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/classic/iso.js
44
44
  var iso_exports = {};
45
45
  __export(iso_exports, {
46
46
  ZodISODate: () => ZodISODate,
@@ -65,7 +65,7 @@ function duration(params) {
65
65
  return _isoDuration(ZodISODuration, params);
66
66
  }
67
67
 
68
- // ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/coerce.js
68
+ // ../../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/classic/coerce.js
69
69
  var coerce_exports = {};
70
70
  __export(coerce_exports, {
71
71
  bigint: () => bigint,
@@ -0,0 +1,27 @@
1
+ import {
2
+ stamp
3
+ } from "./chunk-JZTF36V2.ts";
4
+
5
+ // src/authoring/channels.ts
6
+ var defineChannel = (definition) => stamp(definition, "channel" /* Channel */);
7
+ var disableChannel = () => stamp({ disabled: true }, "channel" /* Channel */);
8
+ var defineProviderChannel = defineChannel;
9
+ var defineRoomSurface = (definition) => stamp(definition, "room-surface" /* RoomSurface */);
10
+ var route = (method) => (path, handler) => ({ method, path, handler });
11
+ var GET = route("GET");
12
+ var POST = route("POST");
13
+ var PUT = route("PUT");
14
+ var DELETE = route("DELETE");
15
+ var WS = (path, handler) => ({ method: "WS", path, handler });
16
+
17
+ export {
18
+ defineChannel,
19
+ disableChannel,
20
+ defineProviderChannel,
21
+ defineRoomSurface,
22
+ GET,
23
+ POST,
24
+ PUT,
25
+ DELETE,
26
+ WS
27
+ };
@@ -2,12 +2,12 @@ import {
2
2
  DynamicEvent,
3
3
  containsDynamicSlot,
4
4
  maybeDynamic
5
- } from "./chunk-R4IHPPTB.ts";
5
+ } from "./chunk-UUQAHJRT.ts";
6
6
  import {
7
7
  jsonObjectSchema,
8
8
  jsonSchemaSchema,
9
9
  jsonValueSchema
10
- } from "./chunk-FU5VHNO4.ts";
10
+ } from "./chunk-3R7MNW5L.ts";
11
11
  import {
12
12
  array,
13
13
  boolean,
@@ -20,7 +20,7 @@ import {
20
20
  strictObject,
21
21
  string,
22
22
  union
23
- } from "./chunk-KTXTYIF4.ts";
23
+ } from "./chunk-4A4EQHYK.ts";
24
24
 
25
25
  // ../agent-protocol/src/avatar.ts
26
26
  var avatarMediaSchema = discriminatedUnion("type", [
@@ -60,7 +60,7 @@ var bundleRef = (exportName) => ({
60
60
  var formatProviderRef = (ref) => ref.kind === "package" /* Package */ ? `package:${ref.specifier}` : `bundle:${ref.export}`;
61
61
 
62
62
  // ../agent-provider/src/manifest.ts
63
- var MANIFEST_VERSION = 3;
63
+ var MANIFEST_VERSION = 4;
64
64
  var BaseCapability = /* @__PURE__ */ ((BaseCapability2) => {
65
65
  BaseCapability2["Shell"] = "shell";
66
66
  BaseCapability2["Files"] = "files";
@@ -200,13 +200,26 @@ var baseToolsSchema = object({
200
200
  // provides them natively (host-disableable, host-fixed) can serve them.
201
201
  host: array(nativeEnum(BaseCapability)).optional()
202
202
  });
203
- var channelBindingSchema = object({
204
- // Stable within the definition; publish maps it to a binding id.
205
- key: string().min(1),
203
+ var channelCredentialsSchema = object({
204
+ app: string().nullable(),
205
+ secrets: array(string()).optional()
206
+ });
207
+ var channelSurfaceSchema = object({
208
+ routes: array(object({ method: string(), path: string() })),
209
+ listeners: array(string()),
210
+ placeKinds: array(string())
211
+ });
212
+ var roomSurfaceBindingSchema = object({
206
213
  channel: providerRefSchema,
207
214
  config: jsonObjectSchema.default({}),
208
215
  source: string().optional()
209
216
  });
217
+ var channelBindingSchema = roomSurfaceBindingSchema.extend({
218
+ key: string().min(1),
219
+ credentials: channelCredentialsSchema,
220
+ surface: channelSurfaceSchema,
221
+ install: string().optional()
222
+ });
210
223
  var hookBindingSchema = object({
211
224
  slug: string().min(1),
212
225
  export: string().min(1),
@@ -236,8 +249,8 @@ var harnessBindingSchema = object({
236
249
  config: maybeDynamic(jsonValueSchema)
237
250
  });
238
251
  var agentManifestSchema = object({
239
- // Read persisted v2 revisions; v3 writers require hosts enforcing hosted bindings.
240
- version: union([literal(2), literal(MANIFEST_VERSION)]),
252
+ // v4 external-channel writers require a host supporting scoped people and places.
253
+ version: literal(MANIFEST_VERSION),
241
254
  identity: identitySchema,
242
255
  harness: harnessBindingSchema,
243
256
  mcpServers: maybeDynamic(array(mcpServerBindingSchema)),
@@ -248,6 +261,7 @@ var agentManifestSchema = object({
248
261
  // `apiKey({ secret })`). Nothing else is readable.
249
262
  secrets: array(string().min(1)).default([]),
250
263
  channels: array(channelBindingSchema),
264
+ roomSurface: roomSurfaceBindingSchema.optional(),
251
265
  channelSources: record(string(), object({ path: string(), source: string(), disabled: boolean() })).optional(),
252
266
  hooks: array(hookBindingSchema),
253
267
  schedules: array(scheduleDefinitionSchema),
@@ -323,6 +337,8 @@ export {
323
337
  sandboxCredentialRefSchema,
324
338
  sandboxBindingSchema,
325
339
  baseToolsSchema,
340
+ channelCredentialsSchema,
341
+ channelSurfaceSchema,
326
342
  channelBindingSchema,
327
343
  hookBindingSchema,
328
344
  scheduleDefinitionSchema,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  stamp
3
- } from "./chunk-KTBNDKGJ.ts";
3
+ } from "./chunk-JZTF36V2.ts";
4
4
 
5
5
  // src/authoring/skills.ts
6
6
  var defineSkill = (definition) => stamp({ ...definition }, "skill" /* Skill */);
@@ -7,7 +7,7 @@ import {
7
7
  record,
8
8
  string,
9
9
  unknown
10
- } from "./chunk-KTXTYIF4.ts";
10
+ } from "./chunk-4A4EQHYK.ts";
11
11
 
12
12
  // src/runtime/values.ts
13
13
  var authoredValueSchema = unknown();
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  jsonSchemaSchema,
3
3
  jsonValueSchema
4
- } from "./chunk-FU5VHNO4.ts";
4
+ } from "./chunk-3R7MNW5L.ts";
5
5
  import {
6
6
  array,
7
7
  json,
@@ -11,7 +11,7 @@ import {
11
11
  string,
12
12
  union,
13
13
  unknown
14
- } from "./chunk-KTXTYIF4.ts";
14
+ } from "./chunk-4A4EQHYK.ts";
15
15
 
16
16
  // ../agent-provider/src/hosted-bindings.ts
17
17
  var requireHostedBinding = async (options) => {
@@ -7,7 +7,7 @@ import {
7
7
  object,
8
8
  string,
9
9
  unknown
10
- } from "./chunk-KTXTYIF4.ts";
10
+ } from "./chunk-4A4EQHYK.ts";
11
11
 
12
12
  // ../agent-provider/src/sandbox/open-scope.ts
13
13
  var openRequestFieldsSchema = looseObject({
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  credentials
3
- } from "./chunk-QVHDGZAN.ts";
3
+ } from "./chunk-4T2URCJZ.ts";
4
4
  import {
5
5
  DynamicEvent
6
- } from "./chunk-R4IHPPTB.ts";
6
+ } from "./chunk-UUQAHJRT.ts";
7
7
  import {
8
8
  isAuthored,
9
9
  registerPending
10
- } from "./chunk-KTBNDKGJ.ts";
10
+ } from "./chunk-JZTF36V2.ts";
11
11
 
12
12
  // src/authoring/credentials.ts
13
13
  var DYNAMIC_EVENTS = Object.values(DynamicEvent);
@@ -6,15 +6,15 @@ import {
6
6
  resolvedAgentManifestSchema,
7
7
  sandboxBindingSchema,
8
8
  skillBundleSchema
9
- } from "./chunk-EAEQQT33.ts";
9
+ } from "./chunk-Q26ZPNVB.ts";
10
10
  import {
11
11
  findDynamicSlots,
12
12
  isDynamicSlot
13
- } from "./chunk-R4IHPPTB.ts";
13
+ } from "./chunk-UUQAHJRT.ts";
14
14
  import {
15
15
  jsonObjectSchema,
16
16
  jsonValueSchema
17
- } from "./chunk-FU5VHNO4.ts";
17
+ } from "./chunk-3R7MNW5L.ts";
18
18
  import {
19
19
  _null,
20
20
  array,
@@ -22,7 +22,7 @@ import {
22
22
  number,
23
23
  record,
24
24
  string
25
- } from "./chunk-KTXTYIF4.ts";
25
+ } from "./chunk-4A4EQHYK.ts";
26
26
 
27
27
  // src/resolve.ts
28
28
  var SlotValueKind = /* @__PURE__ */ ((SlotValueKind2) => {
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  defineAgent
3
- } from "../../chunk-7KPWSOMK.ts";
4
- import "../../chunk-KTBNDKGJ.ts";
5
- import "../../chunk-OX46N5EP.ts";
6
- import "../../chunk-KTXTYIF4.ts";
3
+ } from "../../chunk-3SDZJK7K.ts";
4
+ import "../../chunk-JZTF36V2.ts";
5
+ import "../../chunk-TCXQ4GLM.ts";
6
+ import "../../chunk-4A4EQHYK.ts";
7
7
  import "../../chunk-32O3ODZE.ts";
8
8
  export {
9
9
  defineAgent
@@ -3,13 +3,13 @@ import {
3
3
  lowerApproval,
4
4
  never,
5
5
  whenInput
6
- } from "../../chunk-O2JWY454.ts";
7
- import "../../chunk-EAEQQT33.ts";
8
- import "../../chunk-R4IHPPTB.ts";
9
- import "../../chunk-FU5VHNO4.ts";
10
- import "../../chunk-KTBNDKGJ.ts";
11
- import "../../chunk-OX46N5EP.ts";
12
- import "../../chunk-KTXTYIF4.ts";
6
+ } from "../../chunk-L7YJCQVB.ts";
7
+ import "../../chunk-Q26ZPNVB.ts";
8
+ import "../../chunk-UUQAHJRT.ts";
9
+ import "../../chunk-3R7MNW5L.ts";
10
+ import "../../chunk-JZTF36V2.ts";
11
+ import "../../chunk-TCXQ4GLM.ts";
12
+ import "../../chunk-4A4EQHYK.ts";
13
13
  import "../../chunk-32O3ODZE.ts";
14
14
  export {
15
15
  always,
@@ -7,9 +7,9 @@ import {
7
7
  pendingIndexOf,
8
8
  registerPending,
9
9
  stamp
10
- } from "../../chunk-KTBNDKGJ.ts";
11
- import "../../chunk-OX46N5EP.ts";
12
- import "../../chunk-KTXTYIF4.ts";
10
+ } from "../../chunk-JZTF36V2.ts";
11
+ import "../../chunk-TCXQ4GLM.ts";
12
+ import "../../chunk-4A4EQHYK.ts";
13
13
  import "../../chunk-32O3ODZE.ts";
14
14
  export {
15
15
  AuthoredKind,
@@ -4,16 +4,14 @@ import {
4
4
  POST,
5
5
  PUT,
6
6
  WS,
7
- channelAccessors,
8
7
  defineChannel,
9
8
  defineProviderChannel,
9
+ defineRoomSurface,
10
10
  disableChannel
11
- } from "../../chunk-ISYIPH2T.ts";
12
- import "../../chunk-JRKGCYWA.ts";
13
- import "../../chunk-FU5VHNO4.ts";
14
- import "../../chunk-KTBNDKGJ.ts";
15
- import "../../chunk-OX46N5EP.ts";
16
- import "../../chunk-KTXTYIF4.ts";
11
+ } from "../../chunk-PLQKTBKO.ts";
12
+ import "../../chunk-JZTF36V2.ts";
13
+ import "../../chunk-TCXQ4GLM.ts";
14
+ import "../../chunk-4A4EQHYK.ts";
17
15
  import "../../chunk-32O3ODZE.ts";
18
16
  export {
19
17
  DELETE,
@@ -21,8 +19,8 @@ export {
21
19
  POST,
22
20
  PUT,
23
21
  WS,
24
- channelAccessors,
25
22
  defineChannel,
26
23
  defineProviderChannel,
24
+ defineRoomSurface,
27
25
  disableChannel
28
26
  };
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  defineHostedConnection,
3
3
  defineMcpClientConnection
4
- } from "../../chunk-BMX2HP6G.ts";
5
- import "../../chunk-VI5WBWUX.ts";
6
- import "../../chunk-EAEQQT33.ts";
7
- import "../../chunk-36MVFRMA.ts";
8
- import "../../chunk-XJNO7EHQ.ts";
9
- import "../../chunk-O3JKMLDP.ts";
4
+ } from "../../chunk-LIRONA4O.ts";
5
+ import "../../chunk-MPZMRU56.ts";
6
+ import "../../chunk-Q26ZPNVB.ts";
7
+ import "../../chunk-IZJMGIAH.ts";
8
+ import "../../chunk-KNYB36DW.ts";
9
+ import "../../chunk-EKR4AEM5.ts";
10
10
  import "../../chunk-7WGYG73V.ts";
11
- import "../../chunk-R4IHPPTB.ts";
12
- import "../../chunk-FU5VHNO4.ts";
13
- import "../../chunk-KTBNDKGJ.ts";
14
- import "../../chunk-OX46N5EP.ts";
15
- import "../../chunk-KTXTYIF4.ts";
11
+ import "../../chunk-UUQAHJRT.ts";
12
+ import "../../chunk-3R7MNW5L.ts";
13
+ import "../../chunk-JZTF36V2.ts";
14
+ import "../../chunk-TCXQ4GLM.ts";
15
+ import "../../chunk-4A4EQHYK.ts";
16
16
  import "../../chunk-32O3ODZE.ts";
17
17
  export {
18
18
  defineHostedConnection,