@octonodes/cli 0.2.6 → 0.2.8

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.6",
3
+ "version": "0.2.8",
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.6",
24
+ "@octonodes/sdk": "0.2.8",
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
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(),
@@ -11685,9 +11685,94 @@ var require_plugin_publishing = __commonJS({
11685
11685
  }
11686
11686
  });
11687
11687
 
11688
- // packages/schema/dist/plugin-allowlist.js
11689
- var require_plugin_allowlist = __commonJS({
11690
- "packages/schema/dist/plugin-allowlist.js"(exports2) {
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) {
11691
11776
  "use strict";
11692
11777
  Object.defineProperty(exports2, "__esModule", { value: true });
11693
11778
  exports2.PluginAllowlistPage = exports2.PluginAllowlistInput = exports2.PluginAllowlistQuery = exports2.PluginAllowlistKind = void 0;
@@ -11746,27 +11831,27 @@ var require_dist = __commonJS({
11746
11831
  exports2.schemaVersion = exports2.octonodeJsonSchema = void 0;
11747
11832
  __exportStar(require_ipc_envelope(), exports2);
11748
11833
  __exportStar(require_octonode_config(), exports2);
11749
- __exportStar(require_workflow_entry(), exports2);
11834
+ __exportStar(require_entry(), exports2);
11750
11835
  __exportStar(require_store(), exports2);
11751
11836
  __exportStar(require_data_tables(), exports2);
11752
11837
  __exportStar(require_data_table_schema(), exports2);
11753
- __exportStar(require_workflow_layout(), exports2);
11838
+ __exportStar(require_layout(), exports2);
11754
11839
  __exportStar(require_source_index(), exports2);
11755
11840
  __exportStar(require_test_workflow_graph(), exports2);
11756
11841
  __exportStar(require_collaboration(), exports2);
11757
11842
  __exportStar(require_task_management(), exports2);
11758
- __exportStar(require_design_collaboration(), exports2);
11759
- __exportStar(require_design_documents(), exports2);
11843
+ __exportStar(require_collaboration2(), exports2);
11844
+ __exportStar(require_documents(), exports2);
11760
11845
  __exportStar(require_analytics_dashboard(), exports2);
11761
11846
  __exportStar(require_capabilities(), exports2);
11762
11847
  __exportStar(require_agent_chat(), exports2);
11763
11848
  __exportStar(require_knowledge(), exports2);
11764
11849
  __exportStar(require_architecture(), exports2);
11765
11850
  __exportStar(require_repository_registry(), exports2);
11766
- __exportStar(require_community_publications(), exports2);
11767
- __exportStar(require_community_media(), exports2);
11768
- __exportStar(require_community_media_types(), exports2);
11769
- __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);
11770
11855
  __exportStar(require_constants(), exports2);
11771
11856
  var json_schema_1 = require_json_schema();
11772
11857
  Object.defineProperty(exports2, "octonodeJsonSchema", { enumerable: true, get: function() {
@@ -11780,14 +11865,15 @@ var require_dist = __commonJS({
11780
11865
  __exportStar(require_access_tokens(), exports2);
11781
11866
  __exportStar(require_plugin(), exports2);
11782
11867
  __exportStar(require_github(), exports2);
11783
- __exportStar(require_workflow_triggers(), exports2);
11784
- __exportStar(require_project_lifecycle(), exports2);
11785
- __exportStar(require_project_jobs(), exports2);
11786
- __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);
11787
11872
  __exportStar(require_execution(), exports2);
11788
11873
  __exportStar(require_execution_constants(), exports2);
11789
- __exportStar(require_plugin_publishing(), exports2);
11790
- __exportStar(require_plugin_allowlist(), exports2);
11874
+ __exportStar(require_publishing(), exports2);
11875
+ __exportStar(require_toolkit(), exports2);
11876
+ __exportStar(require_allowlist(), exports2);
11791
11877
  }
11792
11878
  });
11793
11879
 
@@ -12853,6 +12939,8 @@ var import_zod = require("zod");
12853
12939
  var import_schema = __toESM(require_dist());
12854
12940
  var LOCK_FILENAME = "octonode.lock";
12855
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(),
12856
12944
  version: import_zod.z.string(),
12857
12945
  /** `sha256:<hex>` dir-content hash (hashPluginDir) — the store address + integrity check. */
12858
12946
  sha256: import_zod.z.string(),
@@ -12875,6 +12963,16 @@ var LockEntry = import_zod.z.object({
12875
12963
  var Lockfile = import_zod.z.object({
12876
12964
  lockfileVersion: import_zod.z.literal(1).default(1),
12877
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(),
12878
12976
  generated: import_zod.z.object({
12879
12977
  name: import_zod.z.literal("@octonodes/plugin"),
12880
12978
  spec: import_zod.z.string().regex(/^file:\.\/\.octonode-generated\/plugin-[a-f0-9]{64}\.tgz$/),
@@ -12908,6 +13006,9 @@ function writeLockfile(cwd, lock) {
12908
13006
  }
12909
13007
  function upsertLockEntry(cwd, id, entry) {
12910
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`);
12911
13012
  const next = { ...lock, plugins: { ...lock.plugins, [id]: LockEntry.parse(entry) } };
12912
13013
  writeLockfile(cwd, next);
12913
13014
  return next;
@@ -14016,6 +14117,15 @@ function preparedPluginPin(directory, pin) {
14016
14117
  async function reconcilePluginLock(cwd, next, options = {}) {
14017
14118
  const project = resolveDependencyProject(cwd);
14018
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
+ }
14019
14129
  const loaded = Object.entries(next.plugins).map(([alias, pin]) => {
14020
14130
  const directory = storeEntryDir(pin.pluginId ?? alias, pin.version, pin.sha256, options.storeRoot);
14021
14131
  const manifest2 = loadPluginManifest(directory);
@@ -14075,9 +14185,15 @@ async function activatePluginPin(alias, pin, options = {}) {
14075
14185
  return withDependencyInstall(cwd, () => {
14076
14186
  const lock = readLockfile(cwd);
14077
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`);
14078
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))
14079
14191
  throw new Error(`Plugin alias ${alias} belongs to another source; choose another alias or remove it first`);
14080
- 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
+ );
14081
14197
  });
14082
14198
  }
14083
14199
  async function installLocalArtifact(directory, options = {}) {
@@ -14095,6 +14211,8 @@ async function removePluginPin(alias, options = {}) {
14095
14211
  const cwd = resolveDependencyProject(options.cwd ?? process.cwd()).target;
14096
14212
  await withDependencyInstall(cwd, async () => {
14097
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`);
14098
14216
  const plugins = Object.fromEntries(Object.entries(lock.plugins).filter(([id]) => id !== alias));
14099
14217
  await reconcilePluginLock(cwd, { ...lock, plugins }, options);
14100
14218
  });
@@ -14274,6 +14392,7 @@ function extractPluginArchive(bytes, stage) {
14274
14392
  // packages/plugin/src/remote/registry.ts
14275
14393
  var import_tar4 = require("tar");
14276
14394
  var import_node_crypto5 = require("node:crypto");
14395
+ var import_schema6 = __toESM(require_dist());
14277
14396
  var RemoteRegistry = class {
14278
14397
  constructor(opts = {}) {
14279
14398
  const baseUrl = opts.baseUrl ?? (0, import_common5.OCTONODE_MARKETPLACE_URL)() ?? import_common5.DEFAULT_MARKETPLACE_URL;
@@ -14346,10 +14465,54 @@ var RemoteRegistry = class {
14346
14465
  const response = await this.request(`/marketplace/plugins/${encodeURIComponent(id)}/install`, {
14347
14466
  method: "POST",
14348
14467
  headers: { "content-type": "application/json" },
14349
- body: JSON.stringify({ version, scope, ownerId: opts.ownerId, environment: opts.environment ?? "self_hosted" })
14468
+ body: JSON.stringify({
14469
+ version,
14470
+ scope,
14471
+ ownerId: opts.ownerId,
14472
+ environment: opts.environment ?? "self_hosted",
14473
+ toolkitId: opts.toolkitId,
14474
+ toolkitVersion: opts.toolkitVersion
14475
+ })
14350
14476
  });
14351
14477
  return (await response.json()).installId;
14352
14478
  }
14479
+ async toolkit(id, version) {
14480
+ const response = await this.request(
14481
+ `/marketplace/toolkits/${encodeURIComponent(id)}${version ? `?version=${encodeURIComponent(version)}` : ""}`
14482
+ );
14483
+ return import_schema6.ToolkitRelease.parse(await response.json());
14484
+ }
14485
+ async toolkitPlugins(query) {
14486
+ const params = new URLSearchParams();
14487
+ for (const [key, value] of Object.entries(query)) if (value !== void 0) params.set(key, String(value));
14488
+ const response = await this.request(`/marketplace/toolkits/plugins?${params}`);
14489
+ const page = await response.json();
14490
+ return page.items.map((item) => import_schema6.ToolkitResolvedMember.parse(item));
14491
+ }
14492
+ async resolveToolkit(id, body) {
14493
+ const response = await this.request(`/marketplace/toolkits/${encodeURIComponent(id)}/resolve`, {
14494
+ method: "POST",
14495
+ headers: { "content-type": "application/json" },
14496
+ body: JSON.stringify(body)
14497
+ });
14498
+ return import_schema6.ToolkitRelease.parse(await response.json());
14499
+ }
14500
+ async saveToolkit(definition, id, revision) {
14501
+ const response = await this.request(`/marketplace/toolkits${id ? `/${encodeURIComponent(id)}` : ""}`, {
14502
+ method: id ? "PUT" : "POST",
14503
+ headers: { "content-type": "application/json" },
14504
+ body: JSON.stringify(id ? { definition, revision } : definition)
14505
+ });
14506
+ return import_schema6.ToolkitRelease.parse(await response.json());
14507
+ }
14508
+ async publishToolkit(id, version, revision) {
14509
+ const response = await this.request(`/marketplace/toolkits/${encodeURIComponent(id)}/publish`, {
14510
+ method: "POST",
14511
+ headers: { "content-type": "application/json" },
14512
+ body: JSON.stringify({ version, revision })
14513
+ });
14514
+ return import_schema6.ToolkitRelease.parse(await response.json());
14515
+ }
14353
14516
  /**
14354
14517
  * Pack a plugin folder into a tarball and publish it (metadata + bundle).
14355
14518
  * `orgId` names the org an org/group-scoped version belongs to; `teamId`
@@ -14637,6 +14800,27 @@ async function installFromLock(opts = {}) {
14637
14800
  if (lock.generated && opts.force)
14638
14801
  throw new Error("Generated packages require explicit version updates, not --force repinning");
14639
14802
  const result = { restored: [], present: [], errors: [] };
14803
+ for (const toolkit of Object.values(lock.toolkits ?? {})) {
14804
+ try {
14805
+ if (opts.offline) throw new Error("Toolkit access must be reauthorized online before restore");
14806
+ const release2 = await new RemoteRegistry({ baseUrl: toolkit.registry, token: opts.token }).resolveToolkit(
14807
+ toolkit.id,
14808
+ {
14809
+ version: toolkit.version,
14810
+ sha256: toolkit.sha256,
14811
+ destination: toolkit.destination
14812
+ }
14813
+ );
14814
+ if (release2.plugins.length !== toolkit.plugins.length || release2.plugins.some((member) => {
14815
+ const pin = lock.plugins[member.alias];
14816
+ return !toolkit.plugins.includes(member.alias) || !pin || pin.remoteId !== member.pluginId || pin.registry !== toolkit.registry || pin.version !== member.version || pin.archiveSha256 !== member.sha256;
14817
+ }))
14818
+ throw new Error("Toolkit membership disagrees with octonode.lock");
14819
+ } catch (error) {
14820
+ result.errors.push({ id: toolkit.id, message: error.message });
14821
+ }
14822
+ }
14823
+ if (result.errors.length) return result;
14640
14824
  const libraries = [];
14641
14825
  const dependencies = [];
14642
14826
  for (const [alias, pin] of Object.entries(lock.plugins)) {
@@ -14732,11 +14916,11 @@ async function installFromLock(opts = {}) {
14732
14916
  }
14733
14917
 
14734
14918
  // packages/plugin/src/consumer/lifecycle.ts
14735
- var import_schema6 = __toESM(require_dist());
14919
+ var import_schema7 = __toESM(require_dist());
14736
14920
  async function runPluginLifecycle(command, target, flags) {
14737
14921
  const cwd = resolveDependencyProject(typeof flags.cwd === "string" ? (0, import_node_path15.resolve)(flags.cwd) : process.cwd()).target;
14738
14922
  const scope = typeof flags.scope === "string" ? flags.scope : void 0;
14739
- if (scope && !import_schema6.MARKETPLACE_SCOPES.includes(scope)) throw new Error("Invalid marketplace scope");
14923
+ if (scope && !import_schema7.MARKETPLACE_SCOPES.includes(scope)) throw new Error("Invalid marketplace scope");
14740
14924
  const options = {
14741
14925
  cwd,
14742
14926
  alias: typeof flags.alias === "string" ? flags.alias : void 0,