@app-vitals/agent-admin 1.56.0 → 1.57.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.
@@ -1026,7 +1026,8 @@
1026
1026
  "env",
1027
1027
  "tool",
1028
1028
  "plugin",
1029
- "cron"
1029
+ "cron",
1030
+ "marketplace"
1030
1031
  ]
1031
1032
  },
1032
1033
  "key": {
@@ -1081,7 +1082,8 @@
1081
1082
  "env",
1082
1083
  "tool",
1083
1084
  "plugin",
1084
- "cron"
1085
+ "cron",
1086
+ "marketplace"
1085
1087
  ]
1086
1088
  },
1087
1089
  "key": {
@@ -4395,7 +4397,8 @@
4395
4397
  "env",
4396
4398
  "tool",
4397
4399
  "plugin",
4398
- "cron"
4400
+ "cron",
4401
+ "marketplace"
4399
4402
  ]
4400
4403
  },
4401
4404
  "PutTemplateBody": {
@@ -4440,7 +4443,7 @@
4440
4443
  "payload": {
4441
4444
  "type": "object",
4442
4445
  "additionalProperties": {},
4443
- "description": "Kind-specific fields. env: {value, secret?}; tool: {enabled?}; plugin: {version?, enabled?}; cron: {schedule, prompt, channel?, user?, silent?, enabled?, preCheck?}.",
4446
+ "description": "Kind-specific fields. env: {value, secret?}; tool: {enabled?}; plugin: {version?, enabled?}; cron: {schedule, prompt, channel?, user?, silent?, enabled?, preCheck?}; marketplace: {source, ref?} (key = marketplace name).",
4444
4447
  "example": {
4445
4448
  "value": "lin_abc",
4446
4449
  "secret": true
@@ -8663,7 +8666,7 @@
8663
8666
  "templates"
8664
8667
  ],
8665
8668
  "summary": "Create or replace an agent template",
8666
- "description": "Creates the template for the (accountId, specialty) scope, or replaces the items of the existing one (201 / 200). Account callers may only write their own account (403 otherwise); only platform admins write deployment-wide templates. 422 for an unknown specialty, a denylisted env key (per-agent credentials: Slack tokens, GH_TOKEN, Anthropic credentials, task-store URL/token), an invalid item payload, a cron item without a name key, or a duplicate (kind, key). Env values are encrypted at rest; a secret env item sent as `\"***\"` keeps its stored value.",
8669
+ "description": "Creates the template for the (accountId, specialty) scope, or replaces the items of the existing one (201 / 200). Account callers may only write their own account (403 otherwise); only platform admins write deployment-wide templates. 422 for an unknown specialty, a denylisted env key (per-agent credentials: Slack tokens, GH_TOKEN, Anthropic credentials, task-store URL/token), an invalid item payload, a cron item without a name key, a marketplace item with an invalid name, source or ref (same messages as POST /agents/:id/marketplaces), or a duplicate (kind, key). Env values are encrypted at rest; a secret env item sent as `\"***\"` keeps its stored value.",
8667
8670
  "requestBody": {
8668
8671
  "content": {
8669
8672
  "application/json": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@app-vitals/agent-admin",
3
- "version": "1.56.0",
3
+ "version": "1.57.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/app-vitals/agent.git",
@@ -42,7 +42,7 @@
42
42
  },
43
43
  "dependencies": {
44
44
  "@anthropic-ai/sdk": "0.137.0",
45
- "@app-vitals/agent-lib": "1.56.0",
45
+ "@app-vitals/agent-lib": "1.57.0",
46
46
  "@hono/zod-openapi": "^1.0.0",
47
47
  "@prisma/adapter-pg": "^7.10.0",
48
48
  "@prisma/client": "^7.10.0",
@@ -10,6 +10,10 @@
10
10
 
11
11
  import { renderAdminPage } from "./admin-ui-layout.ts";
12
12
  import { escapeHtml } from "./admin-ui-styles.ts";
13
+ import {
14
+ AGENT_TEMPLATE_ITEM_KINDS,
15
+ type AgentTemplateItemKind,
16
+ } from "./agent-template-items.ts";
13
17
  import {
14
18
  buildSettingsNav,
15
19
  renderSettingsLayout,
@@ -26,7 +30,7 @@ export interface TemplateScopeOption {
26
30
  }
27
31
 
28
32
  export interface TemplateItemRow {
29
- kind: "env" | "tool" | "plugin" | "cron";
33
+ kind: AgentTemplateItemKind;
30
34
  key: string;
31
35
  payload: Record<string, unknown>;
32
36
  }
@@ -90,6 +94,9 @@ function itemFields(
90
94
  case "plugin":
91
95
  return `<label>Version <input name="version" class="form-input" value="${escapeHtml(str(p.version))}" placeholder="latest" /></label>
92
96
  <label><input type="checkbox" name="enabled" value="1"${checked(p.enabled)} /> Enabled</label>`;
97
+ case "marketplace":
98
+ return `<label>Source <input name="source" class="form-input" value="${escapeHtml(str(p.source))}" placeholder="owner/repo" /></label>
99
+ <label>Ref <input name="ref" class="form-input" value="${escapeHtml(str(p.ref))}" placeholder="default branch" /></label>`;
93
100
  case "cron":
94
101
  return `<label>Schedule <input name="schedule" class="form-input" value="${escapeHtml(str(p.schedule))}" placeholder="0 9 * * 1-5" /></label>
95
102
  <label>Prompt <textarea name="prompt" class="form-input" rows="2">${escapeHtml(str(p.prompt))}</textarea></label>
@@ -106,6 +113,7 @@ const KIND_COPY = {
106
113
  tool: { title: "Tools", key: "Tool pattern", ph: "Bash(git *)" },
107
114
  plugin: { title: "Plugins", key: "Plugin", ph: "shipwright@shipwright" },
108
115
  cron: { title: "Crons", key: "Name", ph: "daily-digest" },
116
+ marketplace: { title: "Marketplaces", key: "Name", ph: "example-plugins" },
109
117
  } as const;
110
118
 
111
119
  function kindCard(o: TemplatesPageOpts, kind: TemplateItemRow["kind"]): string {
@@ -158,11 +166,11 @@ export function renderTemplatesPage(o: TemplatesPageOpts): string {
158
166
  isAdmin: o.isAdmin ?? false,
159
167
  body: `${error}${notice}
160
168
  <div class="card">
161
- <p class="help-text">Default env vars, tools, plugins and crons for new agents in a scope. Secret values are masked after saving; leave <code>***</code> to keep the stored value.</p>
169
+ <p class="help-text">Default env vars, tools, plugins, crons and plugin marketplaces for new agents in a scope. Secret values are masked after saving; leave <code>***</code> to keep the stored value.</p>
162
170
  ${scopePicker(o)}
163
171
  ${del}
164
172
  </div>
165
- ${(["env", "tool", "plugin", "cron"] as const).map((k) => kindCard(o, k)).join("\n")}`,
173
+ ${AGENT_TEMPLATE_ITEM_KINDS.map((k) => kindCard(o, k)).join("\n")}`,
166
174
  }),
167
175
  });
168
176
  }
@@ -190,6 +190,15 @@ export function registerAdminTemplatesRoutes(
190
190
  enabled: flag(form, "enabled"),
191
191
  },
192
192
  };
193
+ case "marketplace":
194
+ return {
195
+ kind,
196
+ key,
197
+ payload: {
198
+ source: field(form, "source"),
199
+ ref: orNull(field(form, "ref")),
200
+ },
201
+ };
193
202
  case "cron":
194
203
  return {
195
204
  kind,
@@ -12,6 +12,11 @@
12
12
 
13
13
  import type { Prisma } from "../prisma/client/client.ts";
14
14
  import { ANTHROPIC_CREDENTIAL_KEYS } from "./anthropic-credential-guard.ts";
15
+ import {
16
+ validateMarketplaceName,
17
+ validateMarketplaceRef,
18
+ validateMarketplaceSource,
19
+ } from "./agent-marketplaces.ts";
15
20
  import { UnprocessableEntityError } from "./errors.ts";
16
21
  import type { TokenCrypto } from "./token-crypto.ts";
17
22
 
@@ -20,6 +25,7 @@ export const AGENT_TEMPLATE_ITEM_KINDS = [
20
25
  "tool",
21
26
  "plugin",
22
27
  "cron",
28
+ "marketplace",
23
29
  ] as const;
24
30
  export type AgentTemplateItemKind = (typeof AGENT_TEMPLATE_ITEM_KINDS)[number];
25
31
 
@@ -55,6 +61,20 @@ export function openTemplateItemPayload(
55
61
  return { ...payload, value: crypto.decrypt(payload.value) };
56
62
  }
57
63
 
64
+ /**
65
+ * Throws UnprocessableEntityError (422) unless a marketplace item's key (the
66
+ * marketplace name) and payload ({source, ref?}) pass the same validators as
67
+ * POST /agents/:id/marketplaces.
68
+ */
69
+ export function assertMarketplaceTemplateItem(
70
+ key: string,
71
+ payload: { source: string; ref?: string | null },
72
+ ): void {
73
+ validateMarketplaceName(key);
74
+ validateMarketplaceSource(payload.source);
75
+ validateMarketplaceRef(payload.ref);
76
+ }
77
+
58
78
  /**
59
79
  * Env keys a template may never carry (ATP-1.3): per-agent credentials that
60
80
  * are minted for, or provisioned onto, one specific agent. Copying them from a
@@ -5,6 +5,8 @@
5
5
 
6
6
  import { describe, expect, it } from "bun:test";
7
7
  import {
8
+ AGENT_TEMPLATE_ITEM_KINDS,
9
+ assertMarketplaceTemplateItem,
8
10
  assertTemplateEnvKeyAllowed,
9
11
  openTemplateItemPayload,
10
12
  sealTemplateItemPayload,
@@ -68,3 +70,54 @@ describe("assertTemplateEnvKeyAllowed", () => {
68
70
  expect(() => assertTemplateEnvKeyAllowed("LINEAR_API_KEY")).not.toThrow();
69
71
  });
70
72
  });
73
+
74
+ describe("marketplace template items", () => {
75
+ it("lists marketplace as an item kind and stores it unencrypted", () => {
76
+ expect(AGENT_TEMPLATE_ITEM_KINDS).toContain("marketplace");
77
+ const payload = { source: "example-org/plugins", ref: "v1" };
78
+ expect(sealTemplateItemPayload("marketplace", payload, crypto)).toBe(
79
+ payload,
80
+ );
81
+ expect(openTemplateItemPayload("marketplace", payload, crypto)).toBe(
82
+ payload,
83
+ );
84
+ });
85
+
86
+ it("accepts a valid name, source and ref (ref optional or null)", () => {
87
+ expect(() =>
88
+ assertMarketplaceTemplateItem("example-plugins", {
89
+ source: "example-org/plugins",
90
+ }),
91
+ ).not.toThrow();
92
+ expect(() =>
93
+ assertMarketplaceTemplateItem("m.1_x", {
94
+ source: "https://git.example.com/org/repo.git",
95
+ ref: null,
96
+ }),
97
+ ).not.toThrow();
98
+ expect(() =>
99
+ assertMarketplaceTemplateItem("m", { source: "o/r", ref: "main" }),
100
+ ).not.toThrow();
101
+ });
102
+
103
+ it("returns the per-agent API's 422 messages", () => {
104
+ expect(() =>
105
+ assertMarketplaceTemplateItem("m", {
106
+ source: "https://user:pw@example.com/o/r",
107
+ }),
108
+ ).toThrow(
109
+ "source must be a GitHub 'owner/repo' or an https git URL without credentials",
110
+ );
111
+ expect(() =>
112
+ assertMarketplaceTemplateItem("m", { source: "not a repo" }),
113
+ ).toThrow(UnprocessableEntityError);
114
+ expect(() =>
115
+ assertMarketplaceTemplateItem("-bad name", { source: "o/r" }),
116
+ ).toThrow(
117
+ "name must start with a letter or digit and contain only letters, digits, '.', '_' and '-'",
118
+ );
119
+ expect(() =>
120
+ assertMarketplaceTemplateItem("m", { source: "o/r", ref: "a..b" }),
121
+ ).toThrow("ref must be a plain branch, tag or sha");
122
+ });
123
+ });
@@ -74,6 +74,7 @@ export function mergeTemplateLayers(
74
74
  tool: new Map(),
75
75
  plugin: new Map(),
76
76
  cron: new Map(),
77
+ marketplace: new Map(),
77
78
  };
78
79
  const ordered = [...layers].sort(
79
80
  (a, b) =>
@@ -181,3 +181,53 @@ describe("resolveSpecialtyDefaultSet", () => {
181
181
  expect(resolveSpecialtyDefaultSet("nope", registry)).toBeUndefined();
182
182
  });
183
183
  });
184
+
185
+ describe("mergeTemplateLayers: marketplace items", () => {
186
+ const mk = (source: string) => ({
187
+ kind: "marketplace" as const,
188
+ key: "example-plugins",
189
+ payload: { source },
190
+ });
191
+ const winner = (layers: TemplateLayerInput[]) =>
192
+ mergeTemplateLayers(layers).marketplace.get("example-plugins");
193
+
194
+ it("applies the plugin layer precedence, narrowest layer wins", () => {
195
+ const layers: TemplateLayerInput[] = [
196
+ { layer: "account", items: [mk("o/3")] },
197
+ { layer: "account-specialty", items: [mk("o/4")] },
198
+ { layer: "deployment", items: [mk("o/1")] },
199
+ { layer: "specialty-default", items: [mk("o/0")] },
200
+ { layer: "deployment-specialty", items: [mk("o/2")] },
201
+ ];
202
+ expect(winner(layers)).toEqual({
203
+ kind: "marketplace",
204
+ key: "example-plugins",
205
+ payload: { source: "o/4" },
206
+ layer: "account-specialty",
207
+ });
208
+ const without = (...drop: string[]) =>
209
+ layers.filter((l) => !drop.includes(l.layer));
210
+ expect(winner(without("account-specialty"))?.payload.source).toBe("o/3");
211
+ expect(
212
+ winner(without("account-specialty", "account"))?.payload.source,
213
+ ).toBe("o/2");
214
+ expect(
215
+ winner(without("account-specialty", "account", "deployment-specialty"))
216
+ ?.payload.source,
217
+ ).toBe("o/1");
218
+ });
219
+
220
+ it("keeps marketplaces separate from plugins of the same key", () => {
221
+ const merged = mergeTemplateLayers([
222
+ {
223
+ layer: "deployment",
224
+ items: [
225
+ mk("o/1"),
226
+ { kind: "plugin", key: "example-plugins", payload: {} },
227
+ ],
228
+ },
229
+ ]);
230
+ expect(merged.marketplace.size).toBe(1);
231
+ expect(merged.plugin.size).toBe(1);
232
+ });
233
+ });
@@ -84,7 +84,13 @@ export interface TemplateReconcileResult {
84
84
  /** "detached" / "unknown_specialty": nothing was written. */
85
85
  status: "reconciled" | "detached" | "unknown_specialty";
86
86
  /** Template-tracked rows (system crons are counted in `systemCrons`). */
87
- counts: Record<AgentTemplateItemKind, TemplateReconcileCounts>;
87
+ counts: Record<
88
+ Exclude<AgentTemplateItemKind, "marketplace">,
89
+ TemplateReconcileCounts
90
+ > & {
91
+ /** TMK-2.3: present once the marketplace reconcile lands (additive). */
92
+ marketplace?: TemplateReconcileCounts;
93
+ };
88
94
  systemCrons: { created: number; updated: number; deleted: number };
89
95
  /** Template items deliberately not applied. */
90
96
  conflicts: TemplateReconcileConflict[];
@@ -175,6 +175,86 @@ describeOrSkip("/templates (integration)", () => {
175
175
  });
176
176
  });
177
177
 
178
+ describe("marketplace items", () => {
179
+ const mkt = (key: string, payload: Record<string, unknown>) => ({
180
+ kind: "marketplace",
181
+ key,
182
+ payload,
183
+ });
184
+
185
+ it("round-trips a marketplace item unchanged", async () => {
186
+ const item = mkt("example-plugins", { source: "example-org/plugins" });
187
+ const put = await call("PUT", "/templates", admin, { items: [item] });
188
+ expect([200, 201]).toContain(put.status);
189
+ const list = (await (await call("GET", "/templates", admin)).json()) as {
190
+ templates: {
191
+ items: { kind: string; key: string; payload: unknown }[];
192
+ }[];
193
+ };
194
+ const got = list.templates[0]?.items.find(
195
+ (i) => i.kind === "marketplace",
196
+ );
197
+ expect(got).toMatchObject(item);
198
+ const { id } = (await put.json()) as { id: string };
199
+ const row = await prisma.agentTemplateItem.findFirstOrThrow({
200
+ where: { templateId: id, kind: "marketplace" },
201
+ });
202
+ expect(row.payload).toEqual({ source: "example-org/plugins" });
203
+ });
204
+
205
+ it("supports item upsert and delete", async () => {
206
+ const put = await call("PUT", "/templates", admin, { items: [] });
207
+ const { id } = (await put.json()) as { id: string };
208
+ const up = await call(
209
+ "PUT",
210
+ `/templates/${id}/items`,
211
+ admin,
212
+ mkt("m1", { source: "o/r", ref: "v1" }),
213
+ );
214
+ expect(up.status).toBe(200);
215
+ const del = await call(
216
+ "DELETE",
217
+ `/templates/${id}/items?kind=marketplace&key=m1`,
218
+ admin,
219
+ );
220
+ expect(del.status).toBeLessThan(300);
221
+ expect(await prisma.agentTemplateItem.count()).toBe(0);
222
+ });
223
+
224
+ it.each([
225
+ ["credentials in source", "m", { source: "https://u:p@example.com/o/r" }],
226
+ ["malformed owner/repo", "m", { source: "not a repo" }],
227
+ ["invalid name", "-bad name", { source: "o/r" }],
228
+ ["invalid ref", "m", { source: "o/r", ref: "a..b" }],
229
+ ])("422 for %s", async (_label, key, payload) => {
230
+ const res = await call("PUT", "/templates", admin, {
231
+ items: [mkt(key, payload)],
232
+ });
233
+ expect(res.status).toBe(422);
234
+ expect(await prisma.agentTemplate.count()).toBe(0);
235
+ });
236
+
237
+ it("422 for a duplicate marketplace key in one body", async () => {
238
+ const item = mkt("m", { source: "o/r" });
239
+ const res = await call("PUT", "/templates", admin, {
240
+ items: [item, item],
241
+ });
242
+ expect(res.status).toBe(422);
243
+ });
244
+
245
+ it("403 for an account caller writing another account or the deployment template", async () => {
246
+ const b = await cookie("b@example.com");
247
+ const items = [mkt("m", { source: "o/r" })];
248
+ expect(
249
+ (await call("PUT", "/templates", b, { accountId: accountA, items }))
250
+ .status,
251
+ ).toBe(403);
252
+ expect(
253
+ (await call("PUT", "/templates", b, { accountId: null, items })).status,
254
+ ).toBe(403);
255
+ });
256
+ });
257
+
178
258
  describe("crypto and masking", () => {
179
259
  it("encrypts env values at rest and masks secrets on GET", async () => {
180
260
  const put = await call("PUT", "/templates", admin, {
@@ -102,7 +102,7 @@ const putTemplateRoute = createRoute({
102
102
  tags: ["templates"],
103
103
  summary: "Create or replace an agent template",
104
104
  description:
105
- 'Creates the template for the (accountId, specialty) scope, or replaces the items of the existing one (201 / 200). Account callers may only write their own account (403 otherwise); only platform admins write deployment-wide templates. 422 for an unknown specialty, a denylisted env key (per-agent credentials: Slack tokens, GH_TOKEN, Anthropic credentials, task-store URL/token), an invalid item payload, a cron item without a name key, or a duplicate (kind, key). Env values are encrypted at rest; a secret env item sent as `"***"` keeps its stored value.',
105
+ 'Creates the template for the (accountId, specialty) scope, or replaces the items of the existing one (201 / 200). Account callers may only write their own account (403 otherwise); only platform admins write deployment-wide templates. 422 for an unknown specialty, a denylisted env key (per-agent credentials: Slack tokens, GH_TOKEN, Anthropic credentials, task-store URL/token), an invalid item payload, a cron item without a name key, a marketplace item with an invalid name, source or ref (same messages as POST /agents/:id/marketplaces), or a duplicate (kind, key). Env values are encrypted at rest; a secret env item sent as `"***"` keeps its stored value.',
106
106
  request: {
107
107
  body: {
108
108
  content: { "application/json": { schema: PutTemplateBodySchema } },
@@ -21,6 +21,7 @@ import { z } from "zod";
21
21
  import type { PrismaClient } from "../prisma/client/client.ts";
22
22
  import {
23
23
  AGENT_TEMPLATE_ITEM_KINDS,
24
+ assertMarketplaceTemplateItem,
24
25
  type AgentTemplateItemKind,
25
26
  assertTemplateEnvKeyAllowed,
26
27
  openTemplateItemPayload,
@@ -92,6 +93,10 @@ const PAYLOAD_SCHEMAS = {
92
93
  enabled: z.boolean().optional(),
93
94
  preCheck: z.string().nullable().optional(),
94
95
  }),
96
+ marketplace: z.object({
97
+ source: z.string(),
98
+ ref: z.string().nullable().optional(),
99
+ }),
95
100
  } satisfies Record<AgentTemplateItemKind, z.ZodType>;
96
101
 
97
102
  /** Validates one item and returns its normalized (still plaintext) payload. */
@@ -129,6 +134,12 @@ export function normalizeTemplateItem(
129
134
  `invalid ${item.kind} item ${key}: ${detail}`,
130
135
  );
131
136
  }
137
+ if (item.kind === "marketplace") {
138
+ assertMarketplaceTemplateItem(
139
+ key,
140
+ parsed.data as { source: string; ref?: string | null },
141
+ );
142
+ }
132
143
  return { kind: item.kind, key, payload: parsed.data };
133
144
  }
134
145
 
package/src/agents-api.ts CHANGED
@@ -61,6 +61,7 @@ import { deleteAgentFully } from "./agent-deletion.ts";
61
61
  import type { AgentEnvService } from "./agent-envs.ts";
62
62
  import type { AgentGitHubInstallationsService } from "./agent-github-installations.ts";
63
63
  import { AgentMarketplaceService } from "./agent-marketplaces.ts";
64
+ import { AGENT_TEMPLATE_ITEM_KINDS } from "./agent-template-items.ts";
64
65
  import type { AgentMemberService } from "./agent-members.ts";
65
66
  import type { AgentPluginService } from "./agent-plugins.ts";
66
67
  import {
@@ -1091,7 +1092,7 @@ const TemplateReconcileResultSchema = z
1091
1092
  }),
1092
1093
  conflicts: z.array(
1093
1094
  z.object({
1094
- kind: z.enum(["env", "tool", "plugin", "cron"]),
1095
+ kind: z.enum(AGENT_TEMPLATE_ITEM_KINDS),
1095
1096
  key: z.string(),
1096
1097
  reason: z.enum([
1097
1098
  "cron_name_conflict",
@@ -1110,7 +1111,7 @@ const TemplateDetachResultSchema = z
1110
1111
 
1111
1112
  const ResetTemplateBodySchema = z
1112
1113
  .object({
1113
- kind: z.enum(["env", "tool", "plugin", "cron"]).optional(),
1114
+ kind: z.enum(AGENT_TEMPLATE_ITEM_KINDS).optional(),
1114
1115
  key: z.string().min(1).optional(),
1115
1116
  })
1116
1117
  .refine((b) => (b.kind === undefined) === (b.key === undefined), {
@@ -9,6 +9,7 @@
9
9
  import { isGithubLogin } from "@app-vitals/agent-lib/github-login";
10
10
  import { isOrgRepo } from "@app-vitals/agent-lib/org-repo";
11
11
  import { z } from "@hono/zod-openapi";
12
+ import { AGENT_TEMPLATE_ITEM_KINDS } from "./agent-template-items.ts";
12
13
 
13
14
  // ─── Common ───────────────────────────────────────────────────────────────────
14
15
 
@@ -1566,7 +1567,7 @@ export const PatchAccountBodySchema = z
1566
1567
  // ─── Agent templates (ATP-1.3) ────────────────────────────────────────────────
1567
1568
 
1568
1569
  export const TemplateItemKindSchema = z
1569
- .enum(["env", "tool", "plugin", "cron"])
1570
+ .enum(AGENT_TEMPLATE_ITEM_KINDS)
1570
1571
  .openapi("TemplateItemKind");
1571
1572
 
1572
1573
  const TemplateItemBaseSchema = z.object({
@@ -1581,7 +1582,7 @@ const TemplateItemBaseSchema = z.object({
1581
1582
  .optional()
1582
1583
  .openapi({
1583
1584
  description:
1584
- "Kind-specific fields. env: {value, secret?}; tool: {enabled?}; plugin: {version?, enabled?}; cron: {schedule, prompt, channel?, user?, silent?, enabled?, preCheck?}.",
1585
+ "Kind-specific fields. env: {value, secret?}; tool: {enabled?}; plugin: {version?, enabled?}; cron: {schedule, prompt, channel?, user?, silent?, enabled?, preCheck?}; marketplace: {source, ref?} (key = marketplace name).",
1585
1586
  example: { value: "lin_abc", secret: true },
1586
1587
  }),
1587
1588
  });