@crossdelta/cloudevents 0.6.7 → 0.6.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/bin/cli.js CHANGED
@@ -4,7 +4,7 @@ import * as fs from 'fs';
4
4
  import { existsSync, readdirSync, statSync } from 'fs';
5
5
  import * as path from 'path';
6
6
  import { join } from 'path';
7
- import { createFlow, createGenerationResult, input, initGenerationContext, trackChange, printGenerationSummary, change, runFlow } from '@crossdelta/flowcore';
7
+ import { createFlow, createGenerationResult, input, initGenerationContext, trackChange, printGenerationSummary, runFlow, change } from '@crossdelta/flowcore';
8
8
  import 'url';
9
9
  import 'glob';
10
10
  import 'zod';
package/dist/index.cjs CHANGED
@@ -2168,7 +2168,7 @@ function cloudEvents(options = {}) {
2168
2168
  // package.json
2169
2169
  var package_default = {
2170
2170
  name: "@crossdelta/cloudevents",
2171
- version: "0.6.7",
2171
+ version: "0.6.8",
2172
2172
  description: "CloudEvents toolkit for TypeScript - Zod validation, handler discovery, NATS JetStream"};
2173
2173
 
2174
2174
  // src/plugin.ts
package/dist/index.d.cts CHANGED
@@ -2,7 +2,6 @@ import { Context } from 'hono';
2
2
  import { CloudEventV1 } from 'cloudevents';
3
3
  import { ZodTypeAny, z } from 'zod';
4
4
  import { ChangeResult, FlowContext, FsContextMixin, GenerationContextMixin, FlowStep } from '@crossdelta/flowcore';
5
- import { PfPlugin } from '@crossdelta/platform-sdk';
6
5
  import { ConsumerMessages, Subscription } from 'nats';
7
6
 
8
7
  /**
@@ -1176,6 +1175,109 @@ interface CloudEventsOptions {
1176
1175
  */
1177
1176
  declare function cloudEvents(options?: CloudEventsOptions): (ctx: Context, next: () => Promise<void>) => Promise<void | Response>;
1178
1177
 
1178
+ /**
1179
+ * Plugin System Types
1180
+ *
1181
+ * pf owns and defines these interfaces.
1182
+ * Plugins MUST adapt to these interfaces.
1183
+ * pf is strict and predictable - no duck-typing, no fallbacks.
1184
+ */
1185
+ /**
1186
+ * Base effect type - all domain effects must have a kind
1187
+ * pf handles effects generically via kind-based handler registry
1188
+ */
1189
+ interface PfEffect {
1190
+ readonly kind: string;
1191
+ }
1192
+ /**
1193
+ * Result of running a command
1194
+ */
1195
+ interface PfCommandResult {
1196
+ /** Domain effects to be applied by the runtime */
1197
+ effects: PfEffect[];
1198
+ /** Optional output to display (for read-only commands) */
1199
+ output?: string | string[];
1200
+ }
1201
+ /**
1202
+ * Command argument definition
1203
+ */
1204
+ interface PfCommandArg {
1205
+ name: string;
1206
+ description: string;
1207
+ required: boolean;
1208
+ }
1209
+ /**
1210
+ * Command option definition
1211
+ */
1212
+ interface PfCommandOption {
1213
+ flags: string;
1214
+ description: string;
1215
+ default?: unknown;
1216
+ }
1217
+ /**
1218
+ * A CLI command provided by a plugin
1219
+ *
1220
+ * Plugins MUST implement this exact interface.
1221
+ */
1222
+ interface PfCommand {
1223
+ name: string;
1224
+ description: string;
1225
+ args: PfCommandArg[];
1226
+ options: PfCommandOption[];
1227
+ run(args: Record<string, unknown>, options: Record<string, unknown>): Promise<PfCommandResult>;
1228
+ }
1229
+ /**
1230
+ * An interactive flow provided by a plugin
1231
+ */
1232
+ interface PfFlow {
1233
+ name: string;
1234
+ description: string;
1235
+ getSteps(initialContext?: Record<string, unknown>): Promise<unknown[]>;
1236
+ }
1237
+ /**
1238
+ * Workspace context with all discovered information
1239
+ * pf owns this - plugins receive it during setup
1240
+ */
1241
+ interface PfWorkspaceContext {
1242
+ /** Absolute path to workspace root */
1243
+ workspaceRoot: string;
1244
+ /** Discovered services (relative paths like 'services/api-gateway') */
1245
+ availableServices: string[];
1246
+ /** Contracts package configuration */
1247
+ contracts: {
1248
+ /** Relative path to contracts source (e.g., 'packages/contracts/src') */
1249
+ path: string;
1250
+ /** Package name (e.g., '@my-platform/contracts') */
1251
+ packageName?: string;
1252
+ };
1253
+ }
1254
+ /**
1255
+ * Plugin context provided by pf during setup
1256
+ */
1257
+ interface PfPluginContext {
1258
+ workspace: PfWorkspaceContext;
1259
+ logger: {
1260
+ debug: (message: string) => void;
1261
+ info: (message: string) => void;
1262
+ warn: (message: string) => void;
1263
+ error: (message: string) => void;
1264
+ };
1265
+ }
1266
+ /**
1267
+ * A plugin that can be loaded by pf
1268
+ *
1269
+ * Plugins MUST implement this exact interface.
1270
+ * If a plugin has a different internal API, it must provide an adapter.
1271
+ */
1272
+ interface PfPlugin {
1273
+ name: string;
1274
+ version: string;
1275
+ description?: string;
1276
+ commands: PfCommand[];
1277
+ flows: PfFlow[];
1278
+ setup: (context: PfPluginContext) => Promise<void> | void;
1279
+ }
1280
+
1179
1281
  /**
1180
1282
  * PfPlugin Adapter
1181
1283
  *
package/dist/index.d.ts CHANGED
@@ -2,7 +2,6 @@ import { Context } from 'hono';
2
2
  import { CloudEventV1 } from 'cloudevents';
3
3
  import { ZodTypeAny, z } from 'zod';
4
4
  import { ChangeResult, FlowContext, FsContextMixin, GenerationContextMixin, FlowStep } from '@crossdelta/flowcore';
5
- import { PfPlugin } from '@crossdelta/platform-sdk';
6
5
  import { ConsumerMessages, Subscription } from 'nats';
7
6
 
8
7
  /**
@@ -1176,6 +1175,109 @@ interface CloudEventsOptions {
1176
1175
  */
1177
1176
  declare function cloudEvents(options?: CloudEventsOptions): (ctx: Context, next: () => Promise<void>) => Promise<void | Response>;
1178
1177
 
1178
+ /**
1179
+ * Plugin System Types
1180
+ *
1181
+ * pf owns and defines these interfaces.
1182
+ * Plugins MUST adapt to these interfaces.
1183
+ * pf is strict and predictable - no duck-typing, no fallbacks.
1184
+ */
1185
+ /**
1186
+ * Base effect type - all domain effects must have a kind
1187
+ * pf handles effects generically via kind-based handler registry
1188
+ */
1189
+ interface PfEffect {
1190
+ readonly kind: string;
1191
+ }
1192
+ /**
1193
+ * Result of running a command
1194
+ */
1195
+ interface PfCommandResult {
1196
+ /** Domain effects to be applied by the runtime */
1197
+ effects: PfEffect[];
1198
+ /** Optional output to display (for read-only commands) */
1199
+ output?: string | string[];
1200
+ }
1201
+ /**
1202
+ * Command argument definition
1203
+ */
1204
+ interface PfCommandArg {
1205
+ name: string;
1206
+ description: string;
1207
+ required: boolean;
1208
+ }
1209
+ /**
1210
+ * Command option definition
1211
+ */
1212
+ interface PfCommandOption {
1213
+ flags: string;
1214
+ description: string;
1215
+ default?: unknown;
1216
+ }
1217
+ /**
1218
+ * A CLI command provided by a plugin
1219
+ *
1220
+ * Plugins MUST implement this exact interface.
1221
+ */
1222
+ interface PfCommand {
1223
+ name: string;
1224
+ description: string;
1225
+ args: PfCommandArg[];
1226
+ options: PfCommandOption[];
1227
+ run(args: Record<string, unknown>, options: Record<string, unknown>): Promise<PfCommandResult>;
1228
+ }
1229
+ /**
1230
+ * An interactive flow provided by a plugin
1231
+ */
1232
+ interface PfFlow {
1233
+ name: string;
1234
+ description: string;
1235
+ getSteps(initialContext?: Record<string, unknown>): Promise<unknown[]>;
1236
+ }
1237
+ /**
1238
+ * Workspace context with all discovered information
1239
+ * pf owns this - plugins receive it during setup
1240
+ */
1241
+ interface PfWorkspaceContext {
1242
+ /** Absolute path to workspace root */
1243
+ workspaceRoot: string;
1244
+ /** Discovered services (relative paths like 'services/api-gateway') */
1245
+ availableServices: string[];
1246
+ /** Contracts package configuration */
1247
+ contracts: {
1248
+ /** Relative path to contracts source (e.g., 'packages/contracts/src') */
1249
+ path: string;
1250
+ /** Package name (e.g., '@my-platform/contracts') */
1251
+ packageName?: string;
1252
+ };
1253
+ }
1254
+ /**
1255
+ * Plugin context provided by pf during setup
1256
+ */
1257
+ interface PfPluginContext {
1258
+ workspace: PfWorkspaceContext;
1259
+ logger: {
1260
+ debug: (message: string) => void;
1261
+ info: (message: string) => void;
1262
+ warn: (message: string) => void;
1263
+ error: (message: string) => void;
1264
+ };
1265
+ }
1266
+ /**
1267
+ * A plugin that can be loaded by pf
1268
+ *
1269
+ * Plugins MUST implement this exact interface.
1270
+ * If a plugin has a different internal API, it must provide an adapter.
1271
+ */
1272
+ interface PfPlugin {
1273
+ name: string;
1274
+ version: string;
1275
+ description?: string;
1276
+ commands: PfCommand[];
1277
+ flows: PfFlow[];
1278
+ setup: (context: PfPluginContext) => Promise<void> | void;
1279
+ }
1280
+
1179
1281
  /**
1180
1282
  * PfPlugin Adapter
1181
1283
  *
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@ import * as fs from 'fs';
4
4
  import { existsSync, readdirSync, statSync } from 'fs';
5
5
  import * as path from 'path';
6
6
  import { join, dirname } from 'path';
7
- import { createFlow, createGenerationResult, input, initGenerationContext, trackChange, printGenerationSummary, change, runFlow } from '@crossdelta/flowcore';
7
+ import { createFlow, createGenerationResult, input, initGenerationContext, trackChange, printGenerationSummary, runFlow, change } from '@crossdelta/flowcore';
8
8
  import { fileURLToPath } from 'url';
9
9
  import { glob } from 'glob';
10
10
  import { z } from 'zod';
@@ -2143,7 +2143,7 @@ function cloudEvents(options = {}) {
2143
2143
  // package.json
2144
2144
  var package_default = {
2145
2145
  name: "@crossdelta/cloudevents",
2146
- version: "0.6.7",
2146
+ version: "0.6.8",
2147
2147
  description: "CloudEvents toolkit for TypeScript - Zod validation, handler discovery, NATS JetStream"};
2148
2148
 
2149
2149
  // src/plugin.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crossdelta/cloudevents",
3
- "version": "0.6.7",
3
+ "version": "0.6.8",
4
4
  "description": "CloudEvents toolkit for TypeScript - Zod validation, handler discovery, NATS JetStream",
5
5
  "author": "crossdelta",
6
6
  "license": "MIT",
@@ -56,7 +56,7 @@
56
56
  "peerDependencies": {
57
57
  "@faker-js/faker": ">=9.0.0",
58
58
  "@google-cloud/pubsub": ">=4.0.0",
59
- "hono": "^4.11.4",
59
+ "hono": "^4.12.3",
60
60
  "zod": "^4.0.0"
61
61
  },
62
62
  "peerDependenciesMeta": {
@@ -71,13 +71,12 @@
71
71
  }
72
72
  },
73
73
  "devDependencies": {
74
- "@crossdelta/platform-sdk": "0.19.5",
75
74
  "@faker-js/faker": "^9.7.0",
76
75
  "@google-cloud/pubsub": "^4.9.0",
77
76
  "@stryker-mutator/core": "^9.1.1",
78
77
  "@types/bun": "^1.3.3",
79
78
  "@types/pluralize": "^0.0.33",
80
- "hono": "^4.12.0",
79
+ "hono": "^4.12.3",
81
80
  "stryker-mutator-bun-runner": "^0.4.0",
82
81
  "tsup": "^8.3.5",
83
82
  "typescript": "^5.9.2"