@octonodes/cli 0.2.5 → 0.2.7

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@octonodes/cli",
3
- "version": "0.2.5",
3
+ "version": "0.2.7",
4
4
  "description": "Octonode API and plugin development CLI.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -21,7 +21,7 @@
21
21
  "prepack": "tsc -b"
22
22
  },
23
23
  "dependencies": {
24
- "@octonodes/sdk": "0.2.5",
24
+ "@octonodes/sdk": "0.2.7",
25
25
  "@supabase/supabase-js": "2.107.0",
26
26
  "esbuild": "0.28.1",
27
27
  "tar": "7.5.22",
@@ -721,9 +721,9 @@ var require_croner = __commonJS({
721
721
  }
722
722
  });
723
723
 
724
- // packages/schema/dist/workflow-triggers.js
725
- var require_workflow_triggers = __commonJS({
726
- "packages/schema/dist/workflow-triggers.js"(exports2) {
724
+ // packages/schema/dist/workflow/triggers.js
725
+ var require_triggers = __commonJS({
726
+ "packages/schema/dist/workflow/triggers.js"(exports2) {
727
727
  "use strict";
728
728
  Object.defineProperty(exports2, "__esModule", { value: true });
729
729
  exports2.WorkflowTriggerUpdate = exports2.WorkflowTriggerState = exports2.WorkflowTriggers = exports2.WorkflowTrigger = void 0;
@@ -805,9 +805,9 @@ var require_workflow_triggers = __commonJS({
805
805
  }
806
806
  });
807
807
 
808
- // packages/schema/dist/workflow-entry.js
809
- var require_workflow_entry = __commonJS({
810
- "packages/schema/dist/workflow-entry.js"(exports2) {
808
+ // packages/schema/dist/workflow/entry.js
809
+ var require_entry = __commonJS({
810
+ "packages/schema/dist/workflow/entry.js"(exports2) {
811
811
  "use strict";
812
812
  Object.defineProperty(exports2, "__esModule", { value: true });
813
813
  exports2.WorkflowEntryNodes = exports2.WorkflowNodeRole = void 0;
@@ -1221,9 +1221,9 @@ var require_source_index = __commonJS({
1221
1221
  }
1222
1222
  });
1223
1223
 
1224
- // packages/schema/dist/plugin.js
1224
+ // packages/schema/dist/plugin/plugin.js
1225
1225
  var require_plugin = __commonJS({
1226
- "packages/schema/dist/plugin.js"(exports2) {
1226
+ "packages/schema/dist/plugin/plugin.js"(exports2) {
1227
1227
  "use strict";
1228
1228
  Object.defineProperty(exports2, "__esModule", { value: true });
1229
1229
  exports2.PluginManifest = exports2.PluginConnection = exports2.PluginIntegration = exports2.PluginPermission = exports2.PluginNode = exports2.PluginNpmDependency = exports2.PluginImplementationSource = exports2.NpmClientBinding = exports2.PluginNodeUi = exports2.PLUGIN_UI_BUNDLE_MAX_BYTES = exports2.PluginUiTarget = exports2.PluginScope = void 0;
@@ -1408,11 +1408,11 @@ var require_octonode_config = __commonJS({
1408
1408
  Object.defineProperty(exports2, "__esModule", { value: true });
1409
1409
  exports2.OctonodeConfig = exports2.WorkflowExecutionPlan = exports2.Workflow = exports2.WorkflowSource = exports2.WorkflowInputBinding = exports2.WorkflowTestWorkflow = exports2.WorkflowEvaluation = exports2.WorkflowPromise = exports2.WorkflowPromiseMode = exports2.WorkflowEdge = exports2.ProjectAttachments = exports2.ProjectDefaults = exports2.Environment = exports2.NodeConfig = exports2.NodePresentation = exports2.NodeRuntime = exports2.NodeSignature = exports2.NodeKind = exports2.CONFIG_API_VERSION = void 0;
1410
1410
  exports2.resolveEnvVars = resolveEnvVars;
1411
- var workflow_triggers_js_1 = require_workflow_triggers();
1411
+ var triggers_js_1 = require_triggers();
1412
1412
  var zod_1 = require("zod");
1413
1413
  var ipc_envelope_1 = require_ipc_envelope();
1414
1414
  var icons_1 = require_icons();
1415
- var workflow_entry_1 = require_workflow_entry();
1415
+ var entry_1 = require_entry();
1416
1416
  var source_index_1 = require_source_index();
1417
1417
  var plugin_1 = require_plugin();
1418
1418
  exports2.CONFIG_API_VERSION = "octonode.dev/v1";
@@ -1494,7 +1494,7 @@ var require_octonode_config = __commonJS({
1494
1494
  /** Catalog ancestry, independent of editable presentation. */
1495
1495
  native: zod_1.z.string().optional(),
1496
1496
  /** Stable execution boundary; legacy entries fall back to their icon. */
1497
- role: workflow_entry_1.WorkflowNodeRole.optional(),
1497
+ role: entry_1.WorkflowNodeRole.optional(),
1498
1498
  /** Stable identity key; edges reference this, never the source path. */
1499
1499
  id: zod_1.z.string(),
1500
1500
  /**
@@ -1606,7 +1606,7 @@ var require_octonode_config = __commonJS({
1606
1606
  /** CONFIG-OWNED catalog archive state. */
1607
1607
  archived: zod_1.z.boolean().optional(),
1608
1608
  /** CONFIG-OWNED subscriptions, never executable DAG nodes. */
1609
- triggers: workflow_triggers_js_1.WorkflowTriggers.optional(),
1609
+ triggers: triggers_js_1.WorkflowTriggers.optional(),
1610
1610
  id: zod_1.z.string(),
1611
1611
  /** CODE-OWNED origin for a workflow projected from a normal source file. */
1612
1612
  source: exports2.WorkflowSource.optional(),
@@ -1690,7 +1690,7 @@ var require_octonode_config = __commonJS({
1690
1690
  ...workflow.entry ? [workflow.entry] : [],
1691
1691
  ...workflow.edges.flatMap((edge) => [edge.from.node, edge.to.node])
1692
1692
  ]);
1693
- const result = workflow_entry_1.WorkflowEntryNodes.safeParse(config.nodes.filter((node) => members.has(node.id)).map((node) => ({ id: node.id, icon: node.presentation?.icon, role: node.role })));
1693
+ const result = entry_1.WorkflowEntryNodes.safeParse(config.nodes.filter((node) => members.has(node.id)).map((node) => ({ id: node.id, icon: node.presentation?.icon, role: node.role })));
1694
1694
  if (!result.success)
1695
1695
  ctx.addIssue({ code: "custom", path: ["workflows", index, "nodes"], message: result.error.issues[0].message });
1696
1696
  });
@@ -1970,9 +1970,9 @@ var require_data_table_schema = __commonJS({
1970
1970
  }
1971
1971
  });
1972
1972
 
1973
- // packages/schema/dist/workflow-layout.js
1974
- var require_workflow_layout = __commonJS({
1975
- "packages/schema/dist/workflow-layout.js"(exports2) {
1973
+ // packages/schema/dist/workflow/layout.js
1974
+ var require_layout = __commonJS({
1975
+ "packages/schema/dist/workflow/layout.js"(exports2) {
1976
1976
  "use strict";
1977
1977
  Object.defineProperty(exports2, "__esModule", { value: true });
1978
1978
  exports2.WorkflowLayout = exports2.GroupLayout = exports2.StickyNoteLayout = void 0;
@@ -3098,9 +3098,9 @@ var require_task_management = __commonJS({
3098
3098
  }
3099
3099
  });
3100
3100
 
3101
- // packages/schema/dist/design-collaboration.js
3102
- var require_design_collaboration = __commonJS({
3103
- "packages/schema/dist/design-collaboration.js"(exports2) {
3101
+ // packages/schema/dist/design/collaboration.js
3102
+ var require_collaboration2 = __commonJS({
3103
+ "packages/schema/dist/design/collaboration.js"(exports2) {
3104
3104
  "use strict";
3105
3105
  Object.defineProperty(exports2, "__esModule", { value: true });
3106
3106
  exports2.designReviewThreadCreateSchema = exports2.designReviewThreadPageSchema = exports2.designReviewThreadSchema = exports2.designAnchorProjectionSchema = exports2.commentTargetSchema = exports2.pullRequestCommentTargetSchema = exports2.designCommentTargetSchema = exports2.designSourceReferenceSchema = exports2.designArtifactRevisionCreateSchema = exports2.designArtifactCreateSchema = exports2.designArtifactPageSchema = exports2.designArtifactSummarySchema = exports2.designArtifactSchema = exports2.designArtifactRevisionSchema = exports2.designPreviewDescriptorSchema = exports2.projectRevisionSchema = void 0;
@@ -3222,9 +3222,9 @@ var require_design_collaboration = __commonJS({
3222
3222
  }
3223
3223
  });
3224
3224
 
3225
- // packages/schema/dist/design-documents.js
3226
- var require_design_documents = __commonJS({
3227
- "packages/schema/dist/design-documents.js"(exports2) {
3225
+ // packages/schema/dist/design/documents.js
3226
+ var require_documents = __commonJS({
3227
+ "packages/schema/dist/design/documents.js"(exports2) {
3228
3228
  "use strict";
3229
3229
  Object.defineProperty(exports2, "__esModule", { value: true });
3230
3230
  exports2.designDocumentShareSchema = exports2.designDocumentUpdateSchema = exports2.designDocumentCreateSchema = exports2.designDocumentDetailSchema = exports2.designDocumentSchema = exports2.designDocumentRevisionSchema = exports2.designDocumentScopeSchema = exports2.designDocumentAccessSchema = exports2.designDocumentFormatSchema = void 0;
@@ -3905,9 +3905,9 @@ var require_repository_registry = __commonJS({
3905
3905
  }
3906
3906
  });
3907
3907
 
3908
- // packages/schema/dist/community-publications.js
3909
- var require_community_publications = __commonJS({
3910
- "packages/schema/dist/community-publications.js"(exports2) {
3908
+ // packages/schema/dist/community/publications.js
3909
+ var require_publications = __commonJS({
3910
+ "packages/schema/dist/community/publications.js"(exports2) {
3911
3911
  "use strict";
3912
3912
  Object.defineProperty(exports2, "__esModule", { value: true });
3913
3913
  exports2.publicationTransitions = exports2.publicationTopicsSchema = exports2.publicationTopicSchema = exports2.publicationModerationPageSchema = exports2.publicationModerationItemSchema = exports2.communityKnowledgeSearchResponseSchema = exports2.communityKnowledgeMatchSchema = exports2.communityKnowledgeSearchRequestSchema = exports2.publicationRatingSchema = exports2.publicationReportSchema = exports2.publicationModerateSchema = exports2.publicationArchiveSchema = exports2.publicationSubmitSchema = exports2.publicationRevisionCreateSchema = exports2.publicationUpdateSchema = exports2.publicationCreateSchema = exports2.publicationCommentCreateSchema = exports2.publicationCommentListQuerySchema = exports2.publicationCommentPageSchema = exports2.publicationCommentSchema = exports2.publicationPageSchema = exports2.publicationMineListQuerySchema = exports2.publicationListQuerySchema = exports2.publicationDetailSchema = exports2.publicationSummarySchema = exports2.publicationRevisionSchema = exports2.publicationLinkSchema = exports2.cslCitationSchema = exports2.publicationAuthorSchema = exports2.creatorProfileSchema = exports2.creatorHandleSchema = exports2.publicationSlugSchema = exports2.publicationModerationDecisionSchema = exports2.publicationOrderSchema = exports2.publicationSortSchema = exports2.publicationStatusSchema = exports2.publicationKindSchema = void 0;
@@ -4136,9 +4136,9 @@ var require_community_publications = __commonJS({
4136
4136
  }
4137
4137
  });
4138
4138
 
4139
- // packages/schema/dist/community-media.js
4140
- var require_community_media = __commonJS({
4141
- "packages/schema/dist/community-media.js"(exports2) {
4139
+ // packages/schema/dist/community/media.js
4140
+ var require_media = __commonJS({
4141
+ "packages/schema/dist/community/media.js"(exports2) {
4142
4142
  "use strict";
4143
4143
  Object.defineProperty(exports2, "__esModule", { value: true });
4144
4144
  exports2.communityMediaBlockSchema = exports2.communityMediaItemSchema = exports2.communityMediaUploadSchema = void 0;
@@ -4189,17 +4189,17 @@ ${JSON.stringify(exports2.communityMediaBlockSchema.parse(block))}
4189
4189
  }
4190
4190
  });
4191
4191
 
4192
- // packages/schema/dist/community-media.types.js
4193
- var require_community_media_types = __commonJS({
4194
- "packages/schema/dist/community-media.types.js"(exports2) {
4192
+ // packages/schema/dist/community/media.types.js
4193
+ var require_media_types = __commonJS({
4194
+ "packages/schema/dist/community/media.types.js"(exports2) {
4195
4195
  "use strict";
4196
4196
  Object.defineProperty(exports2, "__esModule", { value: true });
4197
4197
  }
4198
4198
  });
4199
4199
 
4200
- // packages/schema/dist/workflow-templates.js
4201
- var require_workflow_templates = __commonJS({
4202
- "packages/schema/dist/workflow-templates.js"(exports2) {
4200
+ // packages/schema/dist/workflow/templates.js
4201
+ var require_templates = __commonJS({
4202
+ "packages/schema/dist/workflow/templates.js"(exports2) {
4203
4203
  "use strict";
4204
4204
  Object.defineProperty(exports2, "__esModule", { value: true });
4205
4205
  exports2.workflowTemplateDetailSchema = exports2.workflowTemplateSummarySchema = exports2.workflowTemplateListQuerySchema = exports2.workflowTemplateCreateSchema = exports2.workflowTemplateSnapshotSchema = exports2.workflowTemplatePermissionSchema = exports2.workflowTemplatePlaceholderSchema = exports2.workflowTemplateEdgeSchema = exports2.workflowTemplateNodeSchema = exports2.workflowTemplateDefinitionSchema = void 0;
@@ -4207,7 +4207,7 @@ var require_workflow_templates = __commonJS({
4207
4207
  exports2.createWorkflowTemplateSnapshot = createWorkflowTemplateSnapshot;
4208
4208
  exports2.verifyWorkflowTemplateSnapshot = verifyWorkflowTemplateSnapshot;
4209
4209
  var zod_1 = require("zod");
4210
- var community_publications_1 = require_community_publications();
4210
+ var publications_1 = require_publications();
4211
4211
  var collaboration_1 = require_collaboration();
4212
4212
  var publicJsonSchema = zod_1.z.lazy(() => zod_1.z.union([
4213
4213
  zod_1.z.null(),
@@ -4262,20 +4262,20 @@ var require_workflow_templates = __commonJS({
4262
4262
  placeholders: zod_1.z.array(exports2.workflowTemplatePlaceholderSchema).max(100),
4263
4263
  permissions: zod_1.z.array(exports2.workflowTemplatePermissionSchema).max(100),
4264
4264
  compatibility: zod_1.z.object({ octonode: zod_1.z.string().min(1).max(80), notes: zod_1.z.string().max(1e3).optional() }).strict(),
4265
- creator: zod_1.z.object({ handle: community_publications_1.creatorHandleSchema, displayName: zod_1.z.string().min(1).max(80) }).strict(),
4265
+ creator: zod_1.z.object({ handle: publications_1.creatorHandleSchema, displayName: zod_1.z.string().min(1).max(80) }).strict(),
4266
4266
  license: zod_1.z.string().min(1).max(80)
4267
4267
  }).strict();
4268
4268
  var workflowTemplatePayloadSchema = workflowTemplatePayloadBaseSchema.superRefine((value, context) => scanSensitive(value, context));
4269
4269
  exports2.workflowTemplateSnapshotSchema = workflowTemplatePayloadBaseSchema.extend({ digest: collaboration_1.sha256Schema }).strict().superRefine((value, context) => scanSensitive(value, context));
4270
4270
  function readWorkflowCodeReference(code) {
4271
4271
  const match = /^\/\/ octonode-community: ([a-z0-9-]+) ([a-f0-9]{64})\r?\n/.exec(code);
4272
- if (!match || !community_publications_1.publicationSlugSchema.safeParse(match[1]).success)
4272
+ if (!match || !publications_1.publicationSlugSchema.safeParse(match[1]).success)
4273
4273
  return null;
4274
4274
  return { slug: match[1], digest: match[2] };
4275
4275
  }
4276
4276
  exports2.workflowTemplateCreateSchema = zod_1.z.object({
4277
4277
  publicationId: collaboration_1.entityIdSchema,
4278
- slug: community_publications_1.publicationSlugSchema,
4278
+ slug: publications_1.publicationSlugSchema,
4279
4279
  useCase: zod_1.z.string().trim().min(1).max(120),
4280
4280
  difficulty: zod_1.z.enum(["beginner", "intermediate", "advanced"]),
4281
4281
  triggers: zod_1.z.array(zod_1.z.string().min(1).max(80)).max(20),
@@ -4292,7 +4292,7 @@ var require_workflow_templates = __commonJS({
4292
4292
  difficulty: zod_1.z.enum(["beginner", "intermediate", "advanced"]).optional(),
4293
4293
  trigger: zod_1.z.string().max(80).optional(),
4294
4294
  service: zod_1.z.string().max(80).optional(),
4295
- creator: community_publications_1.creatorHandleSchema.optional(),
4295
+ creator: publications_1.creatorHandleSchema.optional(),
4296
4296
  sort: zod_1.z.enum(["published", "updated", "title"]).default("published"),
4297
4297
  order: zod_1.z.enum(["asc", "desc"]).default("desc"),
4298
4298
  cursor: zod_1.z.string().max(512).optional(),
@@ -4301,12 +4301,12 @@ var require_workflow_templates = __commonJS({
4301
4301
  exports2.workflowTemplateSummarySchema = zod_1.z.object({
4302
4302
  id: collaboration_1.entityIdSchema,
4303
4303
  publicationId: collaboration_1.entityIdSchema,
4304
- slug: community_publications_1.publicationSlugSchema,
4304
+ slug: publications_1.publicationSlugSchema,
4305
4305
  title: zod_1.z.string(),
4306
4306
  description: zod_1.z.string(),
4307
4307
  useCase: zod_1.z.string(),
4308
4308
  difficulty: zod_1.z.enum(["beginner", "intermediate", "advanced"]),
4309
- creator: community_publications_1.creatorHandleSchema,
4309
+ creator: publications_1.creatorHandleSchema,
4310
4310
  nodes: zod_1.z.array(safeId),
4311
4311
  plugins: zod_1.z.array(safeId),
4312
4312
  runtimes: zod_1.z.array(zod_1.z.string()),
@@ -11341,9 +11341,9 @@ var require_github = __commonJS({
11341
11341
  }
11342
11342
  });
11343
11343
 
11344
- // packages/schema/dist/project-lifecycle.js
11345
- var require_project_lifecycle = __commonJS({
11346
- "packages/schema/dist/project-lifecycle.js"(exports2) {
11344
+ // packages/schema/dist/project/lifecycle.js
11345
+ var require_lifecycle = __commonJS({
11346
+ "packages/schema/dist/project/lifecycle.js"(exports2) {
11347
11347
  "use strict";
11348
11348
  Object.defineProperty(exports2, "__esModule", { value: true });
11349
11349
  exports2.ProjectLifecycleRecord = exports2.ProjectLifecycle = void 0;
@@ -11366,9 +11366,9 @@ var require_project_lifecycle = __commonJS({
11366
11366
  }
11367
11367
  });
11368
11368
 
11369
- // packages/schema/dist/project-jobs.js
11370
- var require_project_jobs = __commonJS({
11371
- "packages/schema/dist/project-jobs.js"(exports2) {
11369
+ // packages/schema/dist/project/jobs.js
11370
+ var require_jobs = __commonJS({
11371
+ "packages/schema/dist/project/jobs.js"(exports2) {
11372
11372
  "use strict";
11373
11373
  Object.defineProperty(exports2, "__esModule", { value: true });
11374
11374
  exports2.ProjectJobNotification = exports2.ProjectJobStatus = exports2.ProjectJobResult = exports2.ProjectJobInput = void 0;
@@ -11427,9 +11427,9 @@ var require_project_jobs = __commonJS({
11427
11427
  }
11428
11428
  });
11429
11429
 
11430
- // packages/schema/dist/plugin-version.js
11431
- var require_plugin_version = __commonJS({
11432
- "packages/schema/dist/plugin-version.js"(exports2) {
11430
+ // packages/schema/dist/plugin/version.js
11431
+ var require_version = __commonJS({
11432
+ "packages/schema/dist/plugin/version.js"(exports2) {
11433
11433
  "use strict";
11434
11434
  Object.defineProperty(exports2, "__esModule", { value: true });
11435
11435
  exports2.PluginVersion = void 0;
@@ -11536,19 +11536,19 @@ var require_execution = __commonJS({
11536
11536
  }
11537
11537
  });
11538
11538
 
11539
- // packages/schema/dist/plugin-publishing.js
11540
- var require_plugin_publishing = __commonJS({
11541
- "packages/schema/dist/plugin-publishing.js"(exports2) {
11539
+ // packages/schema/dist/plugin/publishing.js
11540
+ var require_publishing = __commonJS({
11541
+ "packages/schema/dist/plugin/publishing.js"(exports2) {
11542
11542
  "use strict";
11543
11543
  Object.defineProperty(exports2, "__esModule", { value: true });
11544
- exports2.PluginCloudBuild = exports2.PluginPublisherBuildDetail = exports2.PluginPublisherBuilds = exports2.PluginPublisherBuildQuery = exports2.PluginPublisherApplied = exports2.PluginPublisherApply = exports2.PluginPublisherReview = exports2.PluginPublisherReviewItem = exports2.PluginPublisherOperation = exports2.PluginPublisherConnections = exports2.PluginPublisherConnection = exports2.PluginPublisherPreview = exports2.PluginPublisherConsent = exports2.PluginPublisherAutomatic = exports2.PluginPublisherRepository = exports2.PluginPublisherInput = exports2.pluginReleaseScope = exports2.PluginReleaseConfig = exports2.PluginConfigPath = void 0;
11544
+ exports2.PluginCloudBuild = exports2.PluginPublisherBuildDetail = exports2.PluginPublisherBuilds = exports2.PluginPublisherBuildQuery = exports2.PluginPublisherListQuery = exports2.PluginPublisherApplied = exports2.PluginPublisherApply = exports2.PluginPublisherReview = exports2.PluginPublisherReviewItem = exports2.PluginPublisherOperation = exports2.PluginPublisherConnections = exports2.PluginPublisherConnection = exports2.PluginPublisherPreview = exports2.PluginPublisherConsent = exports2.PluginPublisherAutomatic = exports2.PluginPublisherRepository = exports2.PluginPublisherInput = exports2.pluginReleaseScope = exports2.PluginReleaseConfig = exports2.PluginConfigPath = void 0;
11545
11545
  var zod_1 = require("zod");
11546
- var plugin_version_1 = require_plugin_version();
11546
+ var version_1 = require_version();
11547
11547
  exports2.PluginConfigPath = zod_1.z.string().max(512).refine((path) => /^(?:[a-zA-Z0-9_.-]+\/)*(?:plugin\.octonode\.(?:json|ya?ml)|octonode\.plugin\.json)$/.test(path) && !path.split("/").some((part) => [".", "..", ".git", "node_modules"].includes(part)), "Select a repository-relative octonode.plugin.json file (older plugin.octonode release files also work)");
11548
11548
  exports2.PluginReleaseConfig = zod_1.z.object({
11549
11549
  apiVersion: zod_1.z.literal("octonode.plugin/v1"),
11550
11550
  id: zod_1.z.string().max(128).regex(/^[a-z0-9][a-z0-9-]*$/),
11551
- version: plugin_version_1.PluginVersion,
11551
+ version: version_1.PluginVersion,
11552
11552
  scope: zod_1.z.enum(["user", "team", "organization", "public"]),
11553
11553
  teamId: zod_1.z.string().min(1).max(128).optional(),
11554
11554
  orgId: zod_1.z.string().min(1).max(128).optional(),
@@ -11612,17 +11612,32 @@ var require_plugin_publishing = __commonJS({
11612
11612
  repositoryId: zod_1.z.number(),
11613
11613
  buildId: zod_1.z.number()
11614
11614
  });
11615
+ exports2.PluginPublisherListQuery = zod_1.z.object({
11616
+ q: zod_1.z.string().trim().max(200).default(""),
11617
+ offset: zod_1.z.coerce.number().int().min(0).max(1e6).default(0),
11618
+ limit: zod_1.z.coerce.number().int().min(1).max(100).default(25),
11619
+ days: zod_1.z.enum(["7", "30", "90"]).default("30"),
11620
+ scope: zod_1.z.enum(["", "user", "group", "org", "public"]).default(""),
11621
+ source: zod_1.z.enum(["", "sdk", "npm"]).default(""),
11622
+ sort: zod_1.z.enum(["updated", "name", "version", "scope", "source", "installs", "score", "versions"]).default("updated"),
11623
+ direction: zod_1.z.enum(["asc", "desc"]).default("desc")
11624
+ });
11615
11625
  exports2.PluginPublisherBuildQuery = zod_1.z.object({
11616
11626
  repositoryId: zod_1.z.coerce.number().int().positive().optional(),
11617
- page: zod_1.z.coerce.number().int().min(1).max(1e3).default(1),
11627
+ page: zod_1.z.coerce.number().int().min(1).max(1e6).default(1),
11618
11628
  search: zod_1.z.string().max(200).default(""),
11619
11629
  status: zod_1.z.enum(["", "queued", "in_progress", "success", "failure"]).default(""),
11620
- sort: zod_1.z.enum(["newest", "oldest", "name"]).default("newest")
11630
+ sort: zod_1.z.enum(["newest", "oldest", "name", "status", "branch", "sha"]).default("newest"),
11631
+ direction: zod_1.z.enum(["asc", "desc"]).default("asc"),
11632
+ limit: zod_1.z.coerce.number().int().min(1).max(100).default(30),
11633
+ branch: zod_1.z.string().trim().max(200).default(""),
11634
+ sha: zod_1.z.string().trim().max(200).default("")
11621
11635
  });
11622
11636
  exports2.PluginPublisherBuilds = zod_1.z.object({
11623
11637
  total: zod_1.z.number(),
11624
11638
  page: zod_1.z.number(),
11625
11639
  hasMore: zod_1.z.boolean(),
11640
+ limit: zod_1.z.number(),
11626
11641
  items: zod_1.z.array(zod_1.z.object({
11627
11642
  id: zod_1.z.number(),
11628
11643
  repositoryId: zod_1.z.number(),
@@ -11670,6 +11685,128 @@ var require_plugin_publishing = __commonJS({
11670
11685
  }
11671
11686
  });
11672
11687
 
11688
+ // packages/schema/dist/toolkit.js
11689
+ var require_toolkit = __commonJS({
11690
+ "packages/schema/dist/toolkit.js"(exports2) {
11691
+ "use strict";
11692
+ Object.defineProperty(exports2, "__esModule", { value: true });
11693
+ exports2.ToolkitInstallRequest = exports2.ToolkitRelease = exports2.ToolkitResolvedMember = exports2.ToolkitQuery = exports2.ToolkitDefinition = exports2.ToolkitMember = exports2.ToolkitVisibility = exports2.ToolkitOwner = void 0;
11694
+ var zod_1 = require("zod");
11695
+ var plugin_1 = require_plugin();
11696
+ var version_1 = require_version();
11697
+ exports2.ToolkitOwner = zod_1.z.object({
11698
+ kind: zod_1.z.enum(["user", "team", "org"]),
11699
+ id: zod_1.z.string().trim().min(1).max(240)
11700
+ }).strict();
11701
+ exports2.ToolkitVisibility = zod_1.z.enum(["user", "team", "org", "public"]);
11702
+ exports2.ToolkitMember = zod_1.z.object({
11703
+ pluginId: zod_1.z.string().min(1).max(240),
11704
+ version: version_1.PluginVersion,
11705
+ alias: zod_1.z.string().regex(/^[a-z][a-z0-9-]*$/).max(100)
11706
+ }).strict();
11707
+ exports2.ToolkitDefinition = zod_1.z.object({
11708
+ name: zod_1.z.string().trim().min(1).max(200),
11709
+ description: zod_1.z.string().max(4e3).default(""),
11710
+ version: version_1.PluginVersion,
11711
+ owner: exports2.ToolkitOwner,
11712
+ visibility: exports2.ToolkitVisibility,
11713
+ plugins: zod_1.z.array(exports2.ToolkitMember).max(100)
11714
+ }).strict().superRefine((value, ctx) => {
11715
+ if (value.visibility !== "public" && value.visibility !== value.owner.kind)
11716
+ ctx.addIssue({ code: "custom", path: ["visibility"], message: "Visibility must match the owner or be public" });
11717
+ for (const field of ["pluginId", "alias"])
11718
+ if (new Set(value.plugins.map((plugin) => plugin[field])).size !== value.plugins.length)
11719
+ ctx.addIssue({ code: "custom", path: ["plugins"], message: `Duplicate plugin ${field}` });
11720
+ });
11721
+ exports2.ToolkitQuery = zod_1.z.object({
11722
+ q: zod_1.z.string().trim().max(200).default(""),
11723
+ visibility: exports2.ToolkitVisibility.optional(),
11724
+ status: zod_1.z.enum(["draft", "published"]).optional(),
11725
+ ownerKind: exports2.ToolkitOwner.shape.kind.optional(),
11726
+ ownerId: exports2.ToolkitOwner.shape.id.optional(),
11727
+ sort: zod_1.z.enum(["name", "updated", "plugins"]).default("updated"),
11728
+ direction: zod_1.z.enum(["asc", "desc"]).default("desc"),
11729
+ offset: zod_1.z.coerce.number().int().min(0).max(1e6).default(0),
11730
+ limit: zod_1.z.coerce.number().int().min(1).max(100).default(24),
11731
+ npmPackage: zod_1.z.string().regex(/^(@[a-z0-9~._-]+\/)?[a-z0-9~._-]+$/).optional(),
11732
+ npmVersion: version_1.PluginVersion.optional(),
11733
+ installed: zod_1.z.enum(["true", "false"]).optional(),
11734
+ installedVersions: zod_1.z.string().max(64e3).default("[]").transform((value, ctx) => {
11735
+ try {
11736
+ return zod_1.z.array(zod_1.z.tuple([zod_1.z.string().max(240), version_1.PluginVersion])).max(1e3).parse(JSON.parse(value));
11737
+ } catch {
11738
+ ctx.addIssue({ code: "custom", message: "Invalid installed toolkit versions" });
11739
+ return zod_1.z.NEVER;
11740
+ }
11741
+ })
11742
+ });
11743
+ exports2.ToolkitResolvedMember = exports2.ToolkitMember.extend({
11744
+ name: zod_1.z.string(),
11745
+ manifestId: zod_1.z.string(),
11746
+ sha256: zod_1.z.string().regex(/^[a-f0-9]{64}$/),
11747
+ scope: plugin_1.PluginScope,
11748
+ permissions: zod_1.z.array(plugin_1.PluginPermission),
11749
+ publisher: zod_1.z.string().nullable(),
11750
+ npmPackage: zod_1.z.string().nullable(),
11751
+ connections: zod_1.z.array(zod_1.z.string())
11752
+ });
11753
+ exports2.ToolkitRelease = zod_1.z.object({
11754
+ id: zod_1.z.string(),
11755
+ name: zod_1.z.string(),
11756
+ description: zod_1.z.string(),
11757
+ version: version_1.PluginVersion,
11758
+ owner: exports2.ToolkitOwner,
11759
+ visibility: exports2.ToolkitVisibility,
11760
+ revision: zod_1.z.number().int(),
11761
+ sha256: zod_1.z.string().nullable(),
11762
+ status: zod_1.z.enum(["draft", "published"]),
11763
+ plugins: zod_1.z.array(exports2.ToolkitResolvedMember).max(100)
11764
+ });
11765
+ exports2.ToolkitInstallRequest = zod_1.z.object({
11766
+ version: version_1.PluginVersion,
11767
+ sha256: zod_1.z.string().regex(/^[a-f0-9]{64}$/),
11768
+ destination: exports2.ToolkitOwner
11769
+ }).strict();
11770
+ }
11771
+ });
11772
+
11773
+ // packages/schema/dist/plugin/allowlist.js
11774
+ var require_allowlist = __commonJS({
11775
+ "packages/schema/dist/plugin/allowlist.js"(exports2) {
11776
+ "use strict";
11777
+ Object.defineProperty(exports2, "__esModule", { value: true });
11778
+ exports2.PluginAllowlistPage = exports2.PluginAllowlistInput = exports2.PluginAllowlistQuery = exports2.PluginAllowlistKind = void 0;
11779
+ var zod_1 = require("zod");
11780
+ exports2.PluginAllowlistKind = zod_1.z.enum(["org", "team", "user"]);
11781
+ exports2.PluginAllowlistQuery = zod_1.z.object({
11782
+ kind: exports2.PluginAllowlistKind,
11783
+ q: zod_1.z.string().trim().max(200).default(""),
11784
+ status: zod_1.z.enum(["allowed", "available", "all"]).default("allowed"),
11785
+ sort: zod_1.z.enum(["name", "id"]).default("name"),
11786
+ direction: zod_1.z.enum(["asc", "desc"]).default("asc"),
11787
+ offset: zod_1.z.coerce.number().int().min(0).max(1e6).default(0),
11788
+ limit: zod_1.z.coerce.number().int().min(1).max(100).default(25)
11789
+ });
11790
+ exports2.PluginAllowlistInput = zod_1.z.object({
11791
+ kind: exports2.PluginAllowlistKind,
11792
+ id: zod_1.z.string().min(1).max(200)
11793
+ }).strict();
11794
+ exports2.PluginAllowlistPage = zod_1.z.object({
11795
+ items: zod_1.z.array(zod_1.z.object({
11796
+ id: zod_1.z.string(),
11797
+ name: zod_1.z.string(),
11798
+ allowed: zod_1.z.boolean(),
11799
+ inherited: zod_1.z.boolean(),
11800
+ eligible: zod_1.z.boolean()
11801
+ })),
11802
+ total: zod_1.z.number(),
11803
+ offset: zod_1.z.number(),
11804
+ limit: zod_1.z.number(),
11805
+ canAdd: zod_1.z.boolean()
11806
+ });
11807
+ }
11808
+ });
11809
+
11673
11810
  // packages/schema/dist/index.js
11674
11811
  var require_dist = __commonJS({
11675
11812
  "packages/schema/dist/index.js"(exports2) {
@@ -11694,27 +11831,27 @@ var require_dist = __commonJS({
11694
11831
  exports2.schemaVersion = exports2.octonodeJsonSchema = void 0;
11695
11832
  __exportStar(require_ipc_envelope(), exports2);
11696
11833
  __exportStar(require_octonode_config(), exports2);
11697
- __exportStar(require_workflow_entry(), exports2);
11834
+ __exportStar(require_entry(), exports2);
11698
11835
  __exportStar(require_store(), exports2);
11699
11836
  __exportStar(require_data_tables(), exports2);
11700
11837
  __exportStar(require_data_table_schema(), exports2);
11701
- __exportStar(require_workflow_layout(), exports2);
11838
+ __exportStar(require_layout(), exports2);
11702
11839
  __exportStar(require_source_index(), exports2);
11703
11840
  __exportStar(require_test_workflow_graph(), exports2);
11704
11841
  __exportStar(require_collaboration(), exports2);
11705
11842
  __exportStar(require_task_management(), exports2);
11706
- __exportStar(require_design_collaboration(), exports2);
11707
- __exportStar(require_design_documents(), exports2);
11843
+ __exportStar(require_collaboration2(), exports2);
11844
+ __exportStar(require_documents(), exports2);
11708
11845
  __exportStar(require_analytics_dashboard(), exports2);
11709
11846
  __exportStar(require_capabilities(), exports2);
11710
11847
  __exportStar(require_agent_chat(), exports2);
11711
11848
  __exportStar(require_knowledge(), exports2);
11712
11849
  __exportStar(require_architecture(), exports2);
11713
11850
  __exportStar(require_repository_registry(), exports2);
11714
- __exportStar(require_community_publications(), exports2);
11715
- __exportStar(require_community_media(), exports2);
11716
- __exportStar(require_community_media_types(), exports2);
11717
- __exportStar(require_workflow_templates(), exports2);
11851
+ __exportStar(require_publications(), exports2);
11852
+ __exportStar(require_media(), exports2);
11853
+ __exportStar(require_media_types(), exports2);
11854
+ __exportStar(require_templates(), exports2);
11718
11855
  __exportStar(require_constants(), exports2);
11719
11856
  var json_schema_1 = require_json_schema();
11720
11857
  Object.defineProperty(exports2, "octonodeJsonSchema", { enumerable: true, get: function() {
@@ -11728,13 +11865,15 @@ var require_dist = __commonJS({
11728
11865
  __exportStar(require_access_tokens(), exports2);
11729
11866
  __exportStar(require_plugin(), exports2);
11730
11867
  __exportStar(require_github(), exports2);
11731
- __exportStar(require_workflow_triggers(), exports2);
11732
- __exportStar(require_project_lifecycle(), exports2);
11733
- __exportStar(require_project_jobs(), exports2);
11734
- __exportStar(require_plugin_version(), exports2);
11868
+ __exportStar(require_triggers(), exports2);
11869
+ __exportStar(require_lifecycle(), exports2);
11870
+ __exportStar(require_jobs(), exports2);
11871
+ __exportStar(require_version(), exports2);
11735
11872
  __exportStar(require_execution(), exports2);
11736
11873
  __exportStar(require_execution_constants(), exports2);
11737
- __exportStar(require_plugin_publishing(), exports2);
11874
+ __exportStar(require_publishing(), exports2);
11875
+ __exportStar(require_toolkit(), exports2);
11876
+ __exportStar(require_allowlist(), exports2);
11738
11877
  }
11739
11878
  });
11740
11879
 
@@ -12201,8 +12340,8 @@ var require_constants2 = __commonJS({
12201
12340
  exports2.OCTONODE_STORE_DIR = OCTONODE_STORE_DIR;
12202
12341
  var OCTONODE_STUDIO_URL = () => exports2.PROCESS_ENV.OCTONODE_STUDIO_URL ?? exports2.PROCESS_ENV.VITE_OCTONODE_STUDIO_URL ?? exports2.PROCESS_ENV.VITE_PUBLIC_OCTONODE_STUDIO_URL;
12203
12342
  exports2.OCTONODE_STUDIO_URL = OCTONODE_STUDIO_URL;
12204
- var OCTONODE_USER = () => exports2.PROCESS_ENV.OCTONODE_USER;
12205
- exports2.OCTONODE_USER = OCTONODE_USER;
12343
+ var OCTONODE_USER2 = () => exports2.PROCESS_ENV.OCTONODE_USER;
12344
+ exports2.OCTONODE_USER = OCTONODE_USER2;
12206
12345
  var OCTONODE_USER_EMAIL = () => exports2.PROCESS_ENV.OCTONODE_USER_EMAIL;
12207
12346
  exports2.OCTONODE_USER_EMAIL = OCTONODE_USER_EMAIL;
12208
12347
  var OCTONODE_VISUAL_PORT = () => exports2.PROCESS_ENV.OCTONODE_VISUAL_PORT;
@@ -12800,6 +12939,8 @@ var import_zod = require("zod");
12800
12939
  var import_schema = __toESM(require_dist());
12801
12940
  var LOCK_FILENAME = "octonode.lock";
12802
12941
  var LockEntry = import_zod.z.object({
12942
+ /** False only for pins introduced exclusively by a toolkit. Legacy pins are direct. */
12943
+ direct: import_zod.z.boolean().optional(),
12803
12944
  version: import_zod.z.string(),
12804
12945
  /** `sha256:<hex>` dir-content hash (hashPluginDir) — the store address + integrity check. */
12805
12946
  sha256: import_zod.z.string(),
@@ -12822,6 +12963,16 @@ var LockEntry = import_zod.z.object({
12822
12963
  var Lockfile = import_zod.z.object({
12823
12964
  lockfileVersion: import_zod.z.literal(1).default(1),
12824
12965
  plugins: import_zod.z.record(LockEntry).default({}),
12966
+ toolkits: import_zod.z.record(
12967
+ import_zod.z.object({
12968
+ id: import_zod.z.string(),
12969
+ registry: import_zod.z.string().url(),
12970
+ version: import_zod.z.string(),
12971
+ sha256: import_zod.z.string().regex(/^[a-f0-9]{64}$/),
12972
+ plugins: import_zod.z.array(import_zod.z.string()),
12973
+ destination: import_schema.ToolkitOwner
12974
+ }).strict()
12975
+ ).optional(),
12825
12976
  generated: import_zod.z.object({
12826
12977
  name: import_zod.z.literal("@octonodes/plugin"),
12827
12978
  spec: import_zod.z.string().regex(/^file:\.\/\.octonode-generated\/plugin-[a-f0-9]{64}\.tgz$/),
@@ -12855,6 +13006,9 @@ function writeLockfile(cwd, lock) {
12855
13006
  }
12856
13007
  function upsertLockEntry(cwd, id, entry) {
12857
13008
  const lock = readLockfile(cwd);
13009
+ const previous = lock.plugins[id];
13010
+ if (previous && Object.values(lock.toolkits ?? {}).some((toolkit) => toolkit.plugins.includes(id)) && (previous.version !== entry.version || previous.sha256 !== entry.sha256 || previous.registry !== entry.registry || previous.remoteId !== entry.remoteId || previous.pluginId !== entry.pluginId))
13011
+ throw new Error(`Plugin ${id} is required by an installed toolkit; update the toolkit first`);
12858
13012
  const next = { ...lock, plugins: { ...lock.plugins, [id]: LockEntry.parse(entry) } };
12859
13013
  writeLockfile(cwd, next);
12860
13014
  return next;
@@ -13963,6 +14117,15 @@ function preparedPluginPin(directory, pin) {
13963
14117
  async function reconcilePluginLock(cwd, next, options = {}) {
13964
14118
  const project = resolveDependencyProject(cwd);
13965
14119
  const before = readLockfile(cwd);
14120
+ for (const toolkit of Object.values(next.toolkits ?? {})) {
14121
+ for (const alias of toolkit.plugins) {
14122
+ const pin = next.plugins[alias];
14123
+ const previous = before.plugins[alias];
14124
+ if (!pin) throw new Error(`Toolkit ${toolkit.id} requires plugin ${alias}`);
14125
+ if (previous && before.toolkits?.[toolkit.id]?.sha256 === toolkit.sha256 && (pin.version !== previous.version || pin.sha256 !== previous.sha256 || pin.registry !== previous.registry || pin.remoteId !== previous.remoteId))
14126
+ throw new Error(`Update toolkit ${toolkit.id} before changing required plugin ${alias}`);
14127
+ }
14128
+ }
13966
14129
  const loaded = Object.entries(next.plugins).map(([alias, pin]) => {
13967
14130
  const directory = storeEntryDir(pin.pluginId ?? alias, pin.version, pin.sha256, options.storeRoot);
13968
14131
  const manifest2 = loadPluginManifest(directory);
@@ -14022,9 +14185,15 @@ async function activatePluginPin(alias, pin, options = {}) {
14022
14185
  return withDependencyInstall(cwd, () => {
14023
14186
  const lock = readLockfile(cwd);
14024
14187
  const previous = lock.plugins[alias];
14188
+ if (previous && Object.values(lock.toolkits ?? {}).some((toolkit) => toolkit.plugins.includes(alias)) && (previous.version !== pin.version || previous.sha256 !== pin.sha256))
14189
+ throw new Error(`Plugin ${alias} is required by an installed toolkit; update the toolkit first`);
14025
14190
  if (previous && ((previous.pluginId ?? alias) !== (pin.pluginId ?? alias) || previous.registry !== pin.registry || previous.scope !== pin.scope || previous.remoteId !== pin.remoteId || previous.publisher !== pin.publisher))
14026
14191
  throw new Error(`Plugin alias ${alias} belongs to another source; choose another alias or remove it first`);
14027
- return reconcilePluginLock(cwd, { ...lock, plugins: { ...lock.plugins, [alias]: pin } }, options);
14192
+ return reconcilePluginLock(
14193
+ cwd,
14194
+ { ...lock, plugins: { ...lock.plugins, [alias]: { ...pin, direct: true } } },
14195
+ options
14196
+ );
14028
14197
  });
14029
14198
  }
14030
14199
  async function installLocalArtifact(directory, options = {}) {
@@ -14042,6 +14211,8 @@ async function removePluginPin(alias, options = {}) {
14042
14211
  const cwd = resolveDependencyProject(options.cwd ?? process.cwd()).target;
14043
14212
  await withDependencyInstall(cwd, async () => {
14044
14213
  const lock = readLockfile(cwd);
14214
+ if (Object.values(lock.toolkits ?? {}).some((toolkit) => toolkit.plugins.includes(alias)))
14215
+ throw new Error(`Plugin ${alias} is required by an installed toolkit; remove the toolkit first`);
14045
14216
  const plugins = Object.fromEntries(Object.entries(lock.plugins).filter(([id]) => id !== alias));
14046
14217
  await reconcilePluginLock(cwd, { ...lock, plugins }, options);
14047
14218
  });
@@ -14221,6 +14392,7 @@ function extractPluginArchive(bytes, stage) {
14221
14392
  // packages/plugin/src/remote/registry.ts
14222
14393
  var import_tar4 = require("tar");
14223
14394
  var import_node_crypto5 = require("node:crypto");
14395
+ var import_schema6 = __toESM(require_dist());
14224
14396
  var RemoteRegistry = class {
14225
14397
  constructor(opts = {}) {
14226
14398
  const baseUrl = opts.baseUrl ?? (0, import_common5.OCTONODE_MARKETPLACE_URL)() ?? import_common5.DEFAULT_MARKETPLACE_URL;
@@ -14234,11 +14406,15 @@ var RemoteRegistry = class {
14234
14406
  }
14235
14407
  this.baseUrl = baseUrl.replace(/\/$/, "");
14236
14408
  this.token = opts.token ?? (0, import_common5.OCTONODE_MARKETPLACE_TOKEN)();
14409
+ this.workspace = opts.workspace ?? (0, import_common5.OCTONODE_USER)()?.match(/^workspace:((?:user|org|team):.+)$/)?.[1];
14237
14410
  }
14238
14411
  async request(path, init = {}) {
14239
14412
  const headers = new Headers(init.headers);
14240
14413
  if (this.token) headers.set("authorization", `Bearer ${this.token}`);
14241
- const res = await fetch(`${this.baseUrl}${path}`, {
14414
+ const url = new URL(`${this.baseUrl}${path}`);
14415
+ if (this.workspace && (init.method === void 0 || init.method === "GET" || url.pathname.endsWith("/install")))
14416
+ url.searchParams.set("workspace", this.workspace);
14417
+ const res = await fetch(url.toString(), {
14242
14418
  ...init,
14243
14419
  headers,
14244
14420
  redirect: "error",
@@ -14293,6 +14469,43 @@ var RemoteRegistry = class {
14293
14469
  });
14294
14470
  return (await response.json()).installId;
14295
14471
  }
14472
+ async toolkit(id, version) {
14473
+ const response = await this.request(
14474
+ `/marketplace/toolkits/${encodeURIComponent(id)}${version ? `?version=${encodeURIComponent(version)}` : ""}`
14475
+ );
14476
+ return import_schema6.ToolkitRelease.parse(await response.json());
14477
+ }
14478
+ async toolkitPlugins(query) {
14479
+ const params = new URLSearchParams();
14480
+ for (const [key, value] of Object.entries(query)) if (value !== void 0) params.set(key, String(value));
14481
+ const response = await this.request(`/marketplace/toolkits/plugins?${params}`);
14482
+ const page = await response.json();
14483
+ return page.items.map((item) => import_schema6.ToolkitResolvedMember.parse(item));
14484
+ }
14485
+ async resolveToolkit(id, body) {
14486
+ const response = await this.request(`/marketplace/toolkits/${encodeURIComponent(id)}/resolve`, {
14487
+ method: "POST",
14488
+ headers: { "content-type": "application/json" },
14489
+ body: JSON.stringify(body)
14490
+ });
14491
+ return import_schema6.ToolkitRelease.parse(await response.json());
14492
+ }
14493
+ async saveToolkit(definition, id, revision) {
14494
+ const response = await this.request(`/marketplace/toolkits${id ? `/${encodeURIComponent(id)}` : ""}`, {
14495
+ method: id ? "PUT" : "POST",
14496
+ headers: { "content-type": "application/json" },
14497
+ body: JSON.stringify(id ? { definition, revision } : definition)
14498
+ });
14499
+ return import_schema6.ToolkitRelease.parse(await response.json());
14500
+ }
14501
+ async publishToolkit(id, version, revision) {
14502
+ const response = await this.request(`/marketplace/toolkits/${encodeURIComponent(id)}/publish`, {
14503
+ method: "POST",
14504
+ headers: { "content-type": "application/json" },
14505
+ body: JSON.stringify({ version, revision })
14506
+ });
14507
+ return import_schema6.ToolkitRelease.parse(await response.json());
14508
+ }
14296
14509
  /**
14297
14510
  * Pack a plugin folder into a tarball and publish it (metadata + bundle).
14298
14511
  * `orgId` names the org an org/group-scoped version belongs to; `teamId`
@@ -14378,13 +14591,15 @@ var RemoteRegistry = class {
14378
14591
  */
14379
14592
  async install(id, opts = {}) {
14380
14593
  const detail = await this.detail(id, opts.scope);
14594
+ if (detail.manifestId && detail.manifestId !== id)
14595
+ throw new Error("Publisher-qualified plugins require installToStore so their registry identity is preserved");
14381
14596
  const version = opts.version ?? detail.version;
14382
14597
  const release2 = detail.versions?.find((entry) => entry.version === version);
14383
14598
  const dir = await this.downloadBundle(
14384
14599
  id,
14385
14600
  version,
14386
14601
  opts.scope,
14387
- id,
14602
+ detail.manifestId ?? id,
14388
14603
  release2?.archiveSha256 ?? release2?.sha256
14389
14604
  );
14390
14605
  const plugin = await installPlugin(dir, opts);
@@ -14417,7 +14632,7 @@ var RemoteRegistry = class {
14417
14632
  throw new Error("Marketplace release is missing its immutable checksum");
14418
14633
  const availableScopes = versionMeta?.scope ?? detail.scope;
14419
14634
  const scope = opts.scope && availableScopes.includes(opts.scope) ? opts.scope : availableScopes[0];
14420
- const dir = await this.downloadBundle(id, version, scope, id, releaseChecksum);
14635
+ const dir = await this.downloadBundle(id, version, scope, detail.manifestId ?? id, releaseChecksum);
14421
14636
  const entry = (() => {
14422
14637
  try {
14423
14638
  return addToStore(dir, { storeRoot: opts.storeRoot });
@@ -14432,7 +14647,7 @@ var RemoteRegistry = class {
14432
14647
  "Library installation requires native dependency activation; use frozen --artifacts-only for CI restore"
14433
14648
  );
14434
14649
  if (!opts.cacheOnly && !opts.noDeps) {
14435
- const alias2 = opts.alias ?? entry.id;
14650
+ const alias2 = opts.alias ?? (detail.manifestId && id !== detail.manifestId ? id : entry.id);
14436
14651
  const pin2 = {
14437
14652
  pluginId: entry.id,
14438
14653
  remoteId: id,
@@ -14484,7 +14699,7 @@ var RemoteRegistry = class {
14484
14699
  cacheOnly: opts.cacheOnly
14485
14700
  }) : {};
14486
14701
  if (deps.depsError) throw new Error(deps.depsError);
14487
- const alias = opts.alias ?? entry.id;
14702
+ const alias = opts.alias ?? (detail.manifestId && id !== detail.manifestId ? id : entry.id);
14488
14703
  const pin = {
14489
14704
  pluginId: entry.id,
14490
14705
  remoteId: id,
@@ -14578,6 +14793,27 @@ async function installFromLock(opts = {}) {
14578
14793
  if (lock.generated && opts.force)
14579
14794
  throw new Error("Generated packages require explicit version updates, not --force repinning");
14580
14795
  const result = { restored: [], present: [], errors: [] };
14796
+ for (const toolkit of Object.values(lock.toolkits ?? {})) {
14797
+ try {
14798
+ if (opts.offline) throw new Error("Toolkit access must be reauthorized online before restore");
14799
+ const release2 = await new RemoteRegistry({ baseUrl: toolkit.registry, token: opts.token }).resolveToolkit(
14800
+ toolkit.id,
14801
+ {
14802
+ version: toolkit.version,
14803
+ sha256: toolkit.sha256,
14804
+ destination: toolkit.destination
14805
+ }
14806
+ );
14807
+ if (release2.plugins.length !== toolkit.plugins.length || release2.plugins.some((member) => {
14808
+ const pin = lock.plugins[member.alias];
14809
+ return !toolkit.plugins.includes(member.alias) || !pin || pin.remoteId !== member.pluginId || pin.registry !== toolkit.registry || pin.version !== member.version || pin.archiveSha256 !== member.sha256;
14810
+ }))
14811
+ throw new Error("Toolkit membership disagrees with octonode.lock");
14812
+ } catch (error) {
14813
+ result.errors.push({ id: toolkit.id, message: error.message });
14814
+ }
14815
+ }
14816
+ if (result.errors.length) return result;
14581
14817
  const libraries = [];
14582
14818
  const dependencies = [];
14583
14819
  for (const [alias, pin] of Object.entries(lock.plugins)) {
@@ -14673,11 +14909,11 @@ async function installFromLock(opts = {}) {
14673
14909
  }
14674
14910
 
14675
14911
  // packages/plugin/src/consumer/lifecycle.ts
14676
- var import_schema6 = __toESM(require_dist());
14912
+ var import_schema7 = __toESM(require_dist());
14677
14913
  async function runPluginLifecycle(command, target, flags) {
14678
14914
  const cwd = resolveDependencyProject(typeof flags.cwd === "string" ? (0, import_node_path15.resolve)(flags.cwd) : process.cwd()).target;
14679
14915
  const scope = typeof flags.scope === "string" ? flags.scope : void 0;
14680
- if (scope && !import_schema6.MARKETPLACE_SCOPES.includes(scope)) throw new Error("Invalid marketplace scope");
14916
+ if (scope && !import_schema7.MARKETPLACE_SCOPES.includes(scope)) throw new Error("Invalid marketplace scope");
14681
14917
  const options = {
14682
14918
  cwd,
14683
14919
  alias: typeof flags.alias === "string" ? flags.alias : void 0,