@capybara-hq/plugin-sdk 0.1.0-rc.68 → 0.1.0-rc.69

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.
@@ -47,10 +47,5 @@ export declare class ExtensionManifestError extends Error {
47
47
  }
48
48
  /** Plugin name rule (manifest `name`; a connector template's `plugin` is validated by it too). */
49
49
  export declare const EXTENSION_NAME_RE: RegExp;
50
- /**
51
- * Validates the plugin manifest and returns it unchanged; throws ExtensionManifestError when
52
- * invalid. One transition exception: a `config.org` key (modules packed before core#720) is dropped,
53
- * not refused, and the returned manifest is then a copy with `config: { deployment }` only; any
54
- * other `config` key besides `deployment` still throws.
55
- */
50
+ /** Validates the plugin manifest and returns it unchanged; throws ExtensionManifestError when invalid. */
56
51
  export declare function defineExtension(m: ExtensionManifest): ExtensionManifest;
@@ -33,12 +33,7 @@ function checkRefs(label, refs, fail, forbidBrokered = false) {
33
33
  }
34
34
  }
35
35
  }
36
- /**
37
- * Validates the plugin manifest and returns it unchanged; throws ExtensionManifestError when
38
- * invalid. One transition exception: a `config.org` key (modules packed before core#720) is dropped,
39
- * not refused, and the returned manifest is then a copy with `config: { deployment }` only; any
40
- * other `config` key besides `deployment` still throws.
41
- */
36
+ /** Validates the plugin manifest and returns it unchanged; throws ExtensionManifestError when invalid. */
42
37
  export function defineExtension(m) {
43
38
  const plugin = typeof m?.name === "string" && m.name !== "" ? m.name : "<unnamed>";
44
39
  const fail = (msg) => {
@@ -81,7 +76,6 @@ export function defineExtension(m) {
81
76
  fail(`field "optional" entry "${r}" overlaps with "provides" or "requires"`);
82
77
  }
83
78
  }
84
- let legacyOrg = false;
85
79
  if (m.config !== undefined) {
86
80
  if (typeof m.config !== "object" || m.config === null || Array.isArray(m.config)) {
87
81
  fail(`field "config" must be an object`);
@@ -89,10 +83,6 @@ export function defineExtension(m) {
89
83
  for (const key of Object.keys(m.config)) {
90
84
  if (key === "deployment")
91
85
  continue;
92
- if (key === "org") {
93
- legacyOrg = true;
94
- continue;
95
- }
96
86
  fail(`config.${key} is not a config level: the only one is config.deployment`);
97
87
  }
98
88
  }
@@ -105,16 +95,5 @@ export function defineExtension(m) {
105
95
  const uiErrs = validateUiContributions(m.ui, m.permissions);
106
96
  if (uiErrs.length > 0)
107
97
  fail(`invalid ui: ${uiErrs.join("; ")}`);
108
- return legacyOrg ? withoutLegacyOrgConfig(m) : m;
109
- }
110
- /**
111
- * The manifest without the `config.org` key of a module packed before core#720 (a copy, so the
112
- * module's own object is untouched). Dropped silently (the SDK has no logger): its fields never
113
- * reach the static manifest, the permission set, the config levels or the views. Runtime tolerance
114
- * only: the packer and `capybara-plugin check` still refuse `config.org` in new packs. Removed with
115
- * the other pre-core#720 readers in core#720 plan Task 17.
116
- */
117
- function withoutLegacyOrgConfig(m) {
118
- const { org: _legacyOrg, ...config } = m.config;
119
- return { ...m, config };
98
+ return m;
120
99
  }
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export declare const SDK_VERSION = "0.1.0-rc.68";
1
+ export declare const SDK_VERSION = "0.1.0-rc.69";
2
2
  export * from "./agent-template.js";
3
3
  export * from "./avatar-presets.js";
4
4
  export * from "./bootstrap.js";
@@ -24,7 +24,6 @@ export * from "./git-hosts.js";
24
24
  export * from "./hooks.js";
25
25
  export * from "./http-access.js";
26
26
  export * from "./identity.js";
27
- export * from "./legacy-org-access.js";
28
27
  export * from "./marketplace.js";
29
28
  export * from "./model.js";
30
29
  export * from "./model-params.js";
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export const SDK_VERSION = "0.1.0-rc.68";
1
+ export const SDK_VERSION = "0.1.0-rc.69";
2
2
  export * from "./agent-template.js";
3
3
  export * from "./avatar-presets.js";
4
4
  export * from "./bootstrap.js";
@@ -24,7 +24,6 @@ export * from "./git-hosts.js";
24
24
  export * from "./hooks.js";
25
25
  export * from "./http-access.js";
26
26
  export * from "./identity.js";
27
- export * from "./legacy-org-access.js";
28
27
  export * from "./marketplace.js";
29
28
  export * from "./model.js";
30
29
  export * from "./model-params.js";
@@ -98,25 +98,6 @@ const configSchemaJson = z
98
98
  .refine((v) => new TextEncoder().encode(JSON.stringify(v)).length <= CONFIG_UI_LIMITS.configSchemaBytes, {
99
99
  message: `must be at most ${CONFIG_UI_LIMITS.configSchemaBytes} bytes of JSON (${CONFIG_UI_LIMITS.configSchemaBytes / 1024} KiB)`,
100
100
  });
101
- /**
102
- * Transition only: packages packed before core#720 carry the old org-only config in plugin.json:
103
- * `extension.manifest.config.org` (the org config field list, often `[]`) and
104
- * `extension.configSchemas.org` (its form schema). Published tarballs are immutable, so the reader
105
- * accepts both and drops them: they never reach the parsed manifest, the permission set, the
106
- * config levels or the views. Nothing else reads them, `defineExtension` drops a module's
107
- * `config.org` the same way, and the packer refuses it and never writes either. Removed once the official plugins are
108
- * republished and re-pinned (core#720 plan Task 17).
109
- */
110
- const legacyPackedBeforeCore720 = {
111
- configOrg: configFields.optional().meta({
112
- deprecated: true,
113
- description: "Ignored: written only by packers before core#720.",
114
- }),
115
- configSchemasOrg: configSchemaJson.optional().meta({
116
- deprecated: true,
117
- description: "Ignored: written only by packers before core#720.",
118
- }),
119
- };
120
101
  const staticExtensionManifest = z.strictObject({
121
102
  name: z.string(),
122
103
  version: z.string(),
@@ -126,9 +107,7 @@ const staticExtensionManifest = z.strictObject({
126
107
  optional: z.array(z.string()),
127
108
  permissions: z.record(z.string(), z.unknown()),
128
109
  ui: z.array(z.record(z.string(), z.unknown())).optional(),
129
- config: z
130
- .strictObject({ deployment: configFields, org: legacyPackedBeforeCore720.configOrg })
131
- .transform(({ org: _legacyOrg, ...config }) => config),
110
+ config: z.strictObject({ deployment: configFields }),
132
111
  });
133
112
  const setupGuide = z.strictObject({
134
113
  id: z.string().regex(CATALOG_ITEM_NAME_RE, {
@@ -169,13 +148,7 @@ const extensionSection = z.strictObject({
169
148
  manifest: staticExtensionManifest,
170
149
  migrations: dotPath("migrations").optional(),
171
150
  ui: dotPath("ui").optional(),
172
- configSchemas: z
173
- .strictObject({
174
- deployment: configSchemaJson.optional(),
175
- org: legacyPackedBeforeCore720.configSchemasOrg,
176
- })
177
- .transform(({ org: _legacyOrg, ...schemas }) => schemas)
178
- .optional(),
151
+ configSchemas: z.strictObject({ deployment: configSchemaJson.optional() }).optional(),
179
152
  client: clientSection.optional(),
180
153
  });
181
154
  const schema = z
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capybara-hq/plugin-sdk",
3
- "version": "0.1.0-rc.68",
3
+ "version": "0.1.0-rc.69",
4
4
  "description": "Capybara plugin SDK: the types and pure functions plugins are written against",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -351,33 +351,6 @@
351
351
  ],
352
352
  "additionalProperties": false
353
353
  }
354
- },
355
- "org": {
356
- "deprecated": true,
357
- "description": "Ignored: written only by packers before core#720.",
358
- "maxItems": 1000,
359
- "type": "array",
360
- "items": {
361
- "type": "object",
362
- "properties": {
363
- "path": {
364
- "type": "string",
365
- "maxLength": 1000
366
- },
367
- "secret": {
368
- "type": "boolean"
369
- },
370
- "hot": {
371
- "type": "boolean"
372
- }
373
- },
374
- "required": [
375
- "path",
376
- "secret",
377
- "hot"
378
- ],
379
- "additionalProperties": false
380
- }
381
354
  }
382
355
  },
383
356
  "required": [
@@ -419,15 +392,6 @@
419
392
  "type": "string"
420
393
  },
421
394
  "additionalProperties": {}
422
- },
423
- "org": {
424
- "deprecated": true,
425
- "description": "Ignored: written only by packers before core#720.",
426
- "type": "object",
427
- "propertyNames": {
428
- "type": "string"
429
- },
430
- "additionalProperties": {}
431
395
  }
432
396
  },
433
397
  "additionalProperties": false
@@ -1,17 +0,0 @@
1
- import type { z } from "zod";
2
- /**
3
- * @deprecated Removed by core#720; kept only so plugin modules packed before core#720 still load.
4
- * Fields are org-overridable by default (`platformOnly` marks platform-only). Removed in core#720
5
- * plan Task 17.
6
- */
7
- export type OrgAccess = "readonly" | "override";
8
- /**
9
- * @deprecated Removed by core#720; kept only so plugin modules packed before core#720 still load;
10
- * fields are org-overridable by default (`platformOnly` marks platform-only). Removed in core#720
11
- * plan Task 17.
12
- *
13
- * A no-op: it returns `schema` unchanged and adds no meta. Both levels are ignored: the field stays
14
- * an ordinary deployment field, overridable by orgs unless it is marked {@link platformOnly};
15
- * `"readonly"` in particular makes nothing visible to orgs or read-only. New code never calls it.
16
- */
17
- export declare function orgAccess<T extends z.ZodTypeAny>(schema: T, _access: OrgAccess): T;
@@ -1,12 +0,0 @@
1
- /**
2
- * @deprecated Removed by core#720; kept only so plugin modules packed before core#720 still load;
3
- * fields are org-overridable by default (`platformOnly` marks platform-only). Removed in core#720
4
- * plan Task 17.
5
- *
6
- * A no-op: it returns `schema` unchanged and adds no meta. Both levels are ignored: the field stays
7
- * an ordinary deployment field, overridable by orgs unless it is marked {@link platformOnly};
8
- * `"readonly"` in particular makes nothing visible to orgs or read-only. New code never calls it.
9
- */
10
- export function orgAccess(schema, _access) {
11
- return schema;
12
- }