@powerhousedao/reactor-workflow 6.2.3-dev.22 → 6.2.3-dev.24

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/README.md CHANGED
@@ -51,6 +51,15 @@ rather than restated here.
51
51
  `apfile://` refs, the size ceiling and a host-injected fetcher have no
52
52
  upstream equivalent. An `ApFile` a processor builds is flattened to a plain
53
53
  object at that boundary: a class instance does not survive the worker IPC.
54
+ - **Prop validation**, from the same place. Before an action's `run()` or any
55
+ trigger hook but `onDisable`, a prop left unset takes its `defaultValue` and
56
+ the coerced values go through the engine's `validateProperty`. A failure is
57
+ a `PropsValidationError` naming each field, as in
58
+ `Title (title): Expected string, received: undefined`; the step fails and
59
+ piece code never runs. Two departures: a JSON or OBJECT prop whose text does
60
+ not parse reaches the piece as that text, as coercion already hands it on;
61
+ and every declared prop is checked, so a required one absent from the input
62
+ fails, where upstream's processor checks only the keys it was given.
54
63
  - **The SSRF table**, likewise from `./host`. `worker/egress.ts` classifies an
55
64
  address with `ssrfIpClassifier.isBlockedIp`; the connect-time socket and DNS
56
65
  hooks, the per-request policy and the allow-lists are ours. The one range the
@@ -164,6 +173,92 @@ only. There is no second setting: a package installed from that registry
164
173
  already ships pieces that run in the worker, so a bundle fetched from it is no
165
174
  more trusted than one that arrived inside a package.
166
175
 
176
+ ## Known missing features
177
+
178
+ This is what a piece can declare or call that this engine does not run. It is tracked in
179
+ [#3081](https://github.com/powerhouse-inc/powerhouse/issues/3081),
180
+ [#3090](https://github.com/powerhouse-inc/powerhouse/issues/3090),
181
+ [#3091](https://github.com/powerhouse-inc/powerhouse/issues/3091) and
182
+ [#3095](https://github.com/powerhouse-inc/powerhouse/issues/3095).
183
+
184
+ Some are **rejected** rather than run wrongly. A rejected feature is refused
185
+ wherever a user meets it: the catalog, `pieceActions`, `pieceTriggers` and
186
+ block search carry the reason as `unsupported`, and the editor lists the
187
+ block disabled; `blockDescriptor` throws `Piece "<name>": <reason>` (or
188
+ `Trigger "<name>" of "<piece>": <reason>`); enabling a trigger parks it in
189
+ `ERROR` with that message and no retry; a step or hook that reaches the
190
+ worker anyway fails before piece code runs, except `onDisable`, which still
191
+ releases what an earlier enable registered. The reason reads
192
+ `<feature> is not supported yet (<issue URL>)`.
193
+
194
+ **Triggers**
195
+
196
+ - `TriggerStrategy.APP_WEBHOOK` and `context.app.createListeners`: the
197
+ listeners are never read, so deliveries are refused (#3081).
198
+ - `renewConfiguration` / `onRenew`: rejected when the strategy is not
199
+ `NONE`, as `renewConfiguration` (#3090).
200
+ - `TriggerStrategy.MANUAL` on a piece trigger: rejected, as
201
+ `TriggerStrategy.MANUAL` (#3091). The engine's own `core#manual` is not a
202
+ piece trigger and is unaffected.
203
+ - Every `WEBHOOK` trigger's `run()` is called every 15 minutes without a
204
+ `payload`, as a reconciliation sweep. A `run` that only maps the delivery
205
+ either fails or fires a spurious run (#3090).
206
+ - `setSchedule({ cronExpression })` is run as a fixed interval; wall-clock
207
+ time and timezone are lost.
208
+ - `onStart` is never called. The trigger context's `server` is a throwing stub.
209
+ - Outside a delivery a hook's `payload` is `undefined`; upstream passes `{}`
210
+ (#3090).
211
+ - A webhook payload carries no raw body, and its signature headers
212
+ (`x-signature`, `x-hub-signature-256`, `stripe-signature`, `authorization`)
213
+ arrive redacted, so `run()` cannot verify the sender's signature (#3090).
214
+
215
+ **Auth**
216
+
217
+ - CustomAuth `refresh`: rejected, as `CustomAuth refresh` (#3091).
218
+ - `auth` as an array: rejected, as `Multi-auth (auth as an array)` (#3091).
219
+ - OAuth2 and OIDC: rejected, as `OAuth2 auth` and `OIDC auth` (#3091). Their
220
+ connections are refused at check and run too.
221
+ - `server` in `validate` and `getConnectionIdentifier` is a throwing stub.
222
+ - A CUSTOM_AUTH value's props reach the piece as stored, not coerced: a
223
+ `Property.Number` prop arrives as the string it was entered as.
224
+
225
+ **Props**
226
+
227
+ - `refreshOnSearch`: a dropdown's `searchValue` is never sent.
228
+ - An optional prop set to `null` reaches `run()` as `null`; upstream passes
229
+ `undefined`.
230
+ - A DYNAMIC prop's value is not coerced against the props it resolved to, so
231
+ an ARRAY inside it arrives as parallel arrays rather than rows.
232
+ - Dynamic resolvers nested in ARRAY items or DYNAMIC output can't be called.
233
+ - CUSTOM props carry only their type.
234
+ - DYNAMIC prop keys are not escaped, and an `options()` that throws gets no
235
+ disabled-dropdown fallback (#3091).
236
+
237
+ **Actions**
238
+
239
+ - `errorHandlingOptions` (retry, continue on failure) is ignored.
240
+ - `test` is never called.
241
+ - `requireAuth` defaults to `false` in the descriptor; upstream defaults to
242
+ `true`.
243
+ - `run.stop`, `run.respond`, `run.pause`, waitpoints and `generateResumeUrl`
244
+ throw.
245
+ - `connections.get`, `tags`, `server`, `agent` and `flows.list` throw.
246
+ - `ctx.store` checks the key length on `put` only; `get` and `delete` of an
247
+ over-long key answer as if it were absent.
248
+ - `flows.current.version.id` is a constant. `project.id` is `reactor` on
249
+ every reactor: the reactor is the project, as it is for `ctx.store`'s
250
+ PROJECT scope.
251
+
252
+ **Piece**
253
+
254
+ - `deprecated` is not in the descriptor.
255
+ - Every piece gets the current context shape, whatever its `getContextInfo`
256
+ says.
257
+ - Reads of context members outside the documented surface are tracked but not
258
+ reported.
259
+ - A piece's setup markdown can describe Activepieces features this engine
260
+ does not serve, such as the webhook URL's `/sync` and `/test` forms (#3095).
261
+
167
262
  ## Running the tests
168
263
 
169
264
  ```sh
@@ -183,6 +278,17 @@ key so no run picks up a developer's key file. The two live piece suites read
183
278
  `DOCLING_E2E_URL` / `DOCLING_E2E_API_KEY` and `PAPERLESS_E2E_URL` /
184
279
  `PAPERLESS_E2E_USER` / `PAPERLESS_E2E_PASSWORD`, and skip when unset.
185
280
 
281
+ `test/upstream/` holds Activepieces' own engine tests, generated by
282
+ `pieces-framework`'s sync (see its
283
+ [`UPSTREAM.md`](../pieces-framework/UPSTREAM.md#conformance-suite-for-reactor-workflow))
284
+ and run against this engine through the adapters in `test/upstream-adapters/`.
285
+ A case this engine is known to fail runs as `it.fails` and names the issue that
286
+ fixes it; never edit those files by hand. To regenerate them:
287
+
288
+ ```sh
289
+ pnpm --filter @powerhousedao/pieces-framework sync-upstream -- --tag 0.91.0 --from <activepieces checkout>
290
+ ```
291
+
186
292
  ## Design documents
187
293
 
188
294
  [`docs/plan`](./docs/plan) holds the specifications this engine was built from —
@@ -1,4 +1,4 @@
1
- import { B as getActions, V as getTriggers } from "./redact-ChAU8USo.js";
1
+ import { R as unsupportedAuth, U as getActions, W as getTriggers, z as unsupportedTrigger } from "./redact-C2y8tU--.js";
2
2
  import { createRequire } from "node:module";
3
3
  import { readFileSync, realpathSync } from "node:fs";
4
4
  import path from "node:path";
@@ -130,6 +130,9 @@ function describeProperties(props, resolverIdFor) {
130
130
  function isPropertyObject(value) {
131
131
  return value !== null && typeof value === "object";
132
132
  }
133
+ function withUnsupported(feature) {
134
+ return feature ? { unsupported: feature } : {};
135
+ }
133
136
  function buildDescriptor(piece, source) {
134
137
  const actions = Object.entries(getActions(piece)).map(([actionName, action]) => ({
135
138
  name: action.name ?? actionName,
@@ -151,7 +154,8 @@ function buildDescriptor(piece, source) {
151
154
  ...trigger.outputSchema !== void 0 ? { outputSchema: trigger.outputSchema } : {},
152
155
  hasSampleData: trigger.sampleData !== void 0 && trigger.sampleData !== null,
153
156
  ...trigger.sampleData !== void 0 && trigger.sampleData !== null ? { sampleData: trigger.sampleData } : {},
154
- handshake: describeHandshake(trigger)
157
+ handshake: describeHandshake(trigger),
158
+ ...withUnsupported(unsupportedTrigger(trigger))
155
159
  }));
156
160
  const descriptor = {
157
161
  id: `activepieces:${source.packageName}`,
@@ -163,8 +167,10 @@ function buildDescriptor(piece, source) {
163
167
  minimumSupportedRelease: piece.minimumSupportedRelease,
164
168
  maximumSupportedRelease: piece.maximumSupportedRelease,
165
169
  actions,
166
- triggers
170
+ triggers,
171
+ ...withUnsupported(unsupportedAuth(piece.auth))
167
172
  };
173
+ if (Array.isArray(piece.auth)) return descriptor;
168
174
  if (piece.auth && typeof piece.auth === "object") {
169
175
  const authProps = piece.auth.props && typeof piece.auth.props === "object" ? describeProperties(piece.auth.props) : [];
170
176
  descriptor.auth = {
@@ -180,4 +186,4 @@ function buildDescriptor(piece, source) {
180
186
  //#endregion
181
187
  export { loadPieceFromDir as i, describeProperties as n, loadPiece as r, buildDescriptor as t };
182
188
 
183
- //# sourceMappingURL=descriptor-Doax7KPd.js.map
189
+ //# sourceMappingURL=descriptor-E4swpRpd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"descriptor-E4swpRpd.js","names":[],"sources":["../src/pieces/activepieces/loader.ts","../src/pieces/activepieces/descriptor.ts"],"sourcesContent":["import { readFileSync, realpathSync } from \"node:fs\";\nimport { createRequire } from \"node:module\";\nimport path from \"node:path\";\nimport { pathToFileURL } from \"node:url\";\nimport type { ApPiece } from \"./types.js\";\n\nexport interface LoadedPiece {\n piece: ApPiece;\n entryPath: string;\n // Which duck-type check identified the export.\n check: \"constructor-name\" | \"structural\";\n}\n\n// Resolves a bundle's entry file. Published bundles typically carry only\n// `main` (no `exports`, no `type` — they are CJS).\nexport function resolveEntry(pieceDir: string): string {\n const raw = readFileSync(path.join(pieceDir, \"package.json\"), \"utf8\");\n const pkg = JSON.parse(raw) as {\n main?: string;\n module?: string;\n exports?: Record<string, unknown>;\n };\n const dotExport = pkg.exports?.[\".\"];\n const candidates: (string | undefined)[] = [];\n if (typeof dotExport === \"string\") candidates.push(dotExport);\n if (dotExport && typeof dotExport === \"object\") {\n const cond = dotExport as Record<string, unknown>;\n for (const key of [\"import\", \"require\", \"default\"]) {\n const value = cond[key];\n if (typeof value === \"string\") candidates.push(value);\n }\n }\n candidates.push(pkg.main, pkg.module, \"src/index.js\", \"index.js\", \"main.js\");\n // A bundle's manifest (or a symlink inside it) must not point the entry\n // outside pieceDir; realpath so a symlink can't launder the escape.\n const root = realpathSync(pieceDir);\n const rootWithSep = root + path.sep;\n for (const candidate of candidates) {\n if (!candidate) continue;\n const abs = path.resolve(pieceDir, candidate);\n let real: string;\n try {\n real = realpathSync(abs);\n } catch {\n continue; // candidate doesn't exist; try the next one\n }\n if (real !== root && !real.startsWith(rootWithSep)) continue;\n return abs;\n }\n throw new Error(`No entry file found for piece bundle at ${pieceDir}`);\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === \"object\" && value !== null;\n}\n\n// Identify the piece by constructor name (their own loader's check), falling\n// back to structure for bundles minified without keepNames. No `instanceof`.\nfunction findPiece(\n mod: Record<string, unknown>,\n): Pick<LoadedPiece, \"piece\" | \"check\"> | undefined {\n const candidates: unknown[] = [\n ...Object.values(mod),\n ...(isRecord(mod.default) ? Object.values(mod.default) : []),\n mod.default,\n ];\n for (const candidate of candidates) {\n // `constructor?.name`: a bundle may export an Object.create(null), and the\n // real piece is usually beside it in the same module.\n if (isRecord(candidate) && candidate.constructor?.name === \"Piece\") {\n return {\n piece: candidate as unknown as ApPiece,\n check: \"constructor-name\",\n };\n }\n }\n for (const candidate of candidates) {\n if (\n isRecord(candidate) &&\n typeof candidate.displayName === \"string\" &&\n (isRecord(candidate.actions) ||\n typeof candidate.actions === \"function\" ||\n typeof candidate.getAction === \"function\")\n ) {\n return { piece: candidate as unknown as ApPiece, check: \"structural\" };\n }\n }\n return undefined;\n}\n\n// A module the piece names and node cannot find. Dependencies are installed\n// with scripts disabled, so a native or downloaded one looks like this.\nfunction missingModule(entryPath: string, error: unknown): Error | undefined {\n const code = (error as { code?: unknown } | null)?.code;\n if (code !== \"ERR_MODULE_NOT_FOUND\" && code !== \"MODULE_NOT_FOUND\") {\n return undefined;\n }\n const detail = error instanceof Error ? error.message : String(error);\n return new Error(\n `Piece at ${entryPath} could not be loaded: it imports a module that is ` +\n `not there. Its dependencies are installed with lifecycle scripts ` +\n `disabled, so one that compiles or downloads on install -- a native ` +\n `addon, a browser download -- cannot be prepared here. ${detail}`,\n );\n}\n\n// ESM-first `import()` — Node's CJS interop handles the typical CJS bundle —\n// with a `require` fallback.\nexport async function loadPiece(entryPath: string): Promise<LoadedPiece> {\n let mod: Record<string, unknown>;\n try {\n mod = (await import(\n /* @vite-ignore */ pathToFileURL(entryPath).href\n )) as Record<string, unknown>;\n } catch (imported) {\n try {\n const require = createRequire(import.meta.url);\n mod = require(entryPath) as Record<string, unknown>;\n } catch (required) {\n // The import's error names the missing module; require's often names\n // only the entry it was handed.\n throw (\n missingModule(entryPath, imported) ??\n missingModule(entryPath, required) ??\n required\n );\n }\n }\n const found = findPiece(mod);\n if (!found) {\n throw new Error(\n `No Piece export found in ${entryPath}. Export keys: ${Object.keys(mod).join(\", \")}`,\n );\n }\n return { ...found, entryPath };\n}\n\nexport async function loadPieceFromDir(pieceDir: string): Promise<LoadedPiece> {\n return loadPiece(resolveEntry(pieceDir));\n}\n","import {\n getActions,\n getTriggers,\n type ApPiece,\n type ApProperty,\n type ApPropertyType,\n type ApDropdownOption,\n type ApTrigger,\n type ApTriggerStrategy,\n} from \"./types.js\";\nimport {\n unsupportedAuth,\n unsupportedTrigger,\n type UnsupportedFeature,\n} from \"./unsupported.js\";\n\nexport interface PiecePropDescriptor {\n name: string;\n displayName: string;\n description?: string;\n placeholder?: string;\n type: ApPropertyType;\n required: boolean;\n defaultValue?: unknown;\n // STATIC_DROPDOWN choices, extracted so the editor needs no runtime call.\n staticOptions?: ApDropdownOption[];\n // True when the prop carries a design-time resolver (DROPDOWN options() / DYNAMIC props()).\n hasDynamicResolver: boolean;\n // Synthesised domain-provider id: activepieces:<pkg>#<action>.<prop> (doc 08 §6.3).\n // Only top-level props get one; nested resolvers are not addressable yet.\n dynamicResolverId?: string;\n // Sibling prop names whose values feed the resolver; the editor re-runs\n // it when any of them changes.\n refreshers?: string[];\n // Nested shape: an ARRAY item's fields, or the props a DYNAMIC resolver\n // produced (see describeProperties). OBJECT props are free-form and carry none.\n properties?: PiecePropDescriptor[];\n}\n\nexport interface PieceActionDescriptor {\n name: string;\n displayName: string;\n description?: string;\n // UI metadata only — not a credential contract (spike finding).\n requireAuth: boolean;\n props: PiecePropDescriptor[];\n // Carried verbatim: it is what the expression picker builds a later step's\n // field list from, and a package piece has no published listing to read.\n outputSchema?: unknown;\n // Orders the action picker, so a package piece that declares it must be\n // ordered by it too rather than counting as unset.\n audience?: string;\n}\n\nexport interface PieceTriggerDescriptor {\n name: string;\n displayName: string;\n description?: string;\n strategy: ApTriggerStrategy;\n testStrategy?: string;\n requireAuth: boolean;\n props: PiecePropDescriptor[];\n outputSchema?: unknown;\n hasSampleData: boolean;\n // The sample itself, not just whether there is one: a trigger that declares\n // no outputSchema is read for its shape instead.\n sampleData?: unknown;\n // How the sender proves the endpoint exists before it will register it.\n // Absent when the trigger declares no handshake, or declares NONE.\n handshake?: { strategy: string; paramName?: string };\n // A trigger feature the engine cannot run; the piece's own is on the piece.\n unsupported?: UnsupportedFeature;\n}\n\nexport interface PieceAuthDescriptor {\n type: ApPropertyType;\n displayName?: string;\n description?: string;\n required?: boolean;\n // CUSTOM_AUTH's own fields. Without them a connection form has nothing to\n // ask for, which is what a piece read from a package rather than a published\n // listing would otherwise leave the editor with.\n props?: PiecePropDescriptor[];\n}\n\n// NONE is how the framework spells \"no handshake\", so it is not carried:\n// a caller checking the field would otherwise have to know that too.\nfunction describeHandshake(\n trigger: ApTrigger,\n): { strategy: string; paramName?: string } | undefined {\n const strategy = trigger.handshakeConfiguration?.strategy;\n if (!strategy || strategy === \"NONE\") return undefined;\n return { strategy, paramName: trigger.handshakeConfiguration?.paramName };\n}\n\nexport interface PieceSource {\n packageName: string;\n version: string;\n}\n\n// Serializable descriptor of an adapted piece; the engine never learns\n// Activepieces exists (doc 08 §6.2).\nexport interface PieceDescriptor {\n id: string;\n source: PieceSource;\n displayName: string;\n description?: string;\n logoUrl?: string;\n categories?: string[];\n auth?: PieceAuthDescriptor;\n minimumSupportedRelease?: string;\n maximumSupportedRelease?: string;\n actions: PieceActionDescriptor[];\n triggers: PieceTriggerDescriptor[];\n // Set when no block of the piece can run here, e.g. an OAuth2 piece.\n unsupported?: UnsupportedFeature;\n}\n\nfunction hasResolver(prop: ApProperty): boolean {\n return typeof prop.options === \"function\" || typeof prop.props === \"function\";\n}\n\nfunction toPropDescriptor(\n name: string,\n prop: ApProperty,\n resolverId?: string,\n): PiecePropDescriptor {\n const dynamic = hasResolver(prop);\n const descriptor: PiecePropDescriptor = {\n name,\n displayName: prop.displayName ?? name,\n type: prop.type ?? \"UNKNOWN\",\n required: prop.required ?? false,\n hasDynamicResolver: dynamic,\n };\n if (typeof prop.description === \"string\" && prop.description !== \"\") {\n descriptor.description = prop.description;\n }\n if (typeof prop.placeholder === \"string\" && prop.placeholder !== \"\") {\n descriptor.placeholder = prop.placeholder;\n }\n if (prop.defaultValue !== undefined) {\n descriptor.defaultValue = prop.defaultValue;\n }\n if (dynamic && resolverId) {\n descriptor.dynamicResolverId = resolverId;\n }\n if (dynamic && Array.isArray(prop.refreshers)) {\n descriptor.refreshers = prop.refreshers.filter(\n (entry): entry is string => typeof entry === \"string\",\n );\n }\n if (typeof prop.options === \"object\" && Array.isArray(prop.options.options)) {\n descriptor.staticOptions = prop.options.options.map((o) => ({\n label: o.label,\n value: o.value,\n }));\n }\n if (prop.properties && typeof prop.properties === \"object\") {\n const nested = describeProperties(prop.properties);\n if (nested.length > 0) descriptor.properties = nested;\n }\n return descriptor;\n}\n\n// Descriptor list for a props map: nested ARRAY items and what a DYNAMIC\n// resolver returns, so the editor never sees raw piece properties.\nexport function describeProperties(\n props: Record<string, ApProperty> | null | undefined,\n resolverIdFor?: (propName: string) => string,\n): PiecePropDescriptor[] {\n if (!props || typeof props !== \"object\") return [];\n return Object.entries(props)\n .filter((entry): entry is [string, ApProperty] =>\n isPropertyObject(entry[1]),\n )\n .map(([propName, prop]) =>\n toPropDescriptor(propName, prop, resolverIdFor?.(propName)),\n );\n}\n\n// Bundles are duck-typed; a props map may carry non-object junk.\nfunction isPropertyObject(value: unknown): value is ApProperty {\n return value !== null && typeof value === \"object\";\n}\n\nfunction withUnsupported(feature: UnsupportedFeature | undefined): {\n unsupported?: UnsupportedFeature;\n} {\n return feature ? { unsupported: feature } : {};\n}\n\n// Pure translation over a loaded piece; performs no I/O and never executes\n// piece code beyond the actions()/triggers() accessors.\nexport function buildDescriptor(\n piece: ApPiece,\n source: PieceSource,\n): PieceDescriptor {\n const actions = Object.entries(getActions(piece)).map(\n ([actionName, action]): PieceActionDescriptor => ({\n name: action.name ?? actionName,\n displayName: action.displayName ?? actionName,\n description: action.description,\n requireAuth: action.requireAuth ?? false,\n props: describeProperties(\n action.props,\n (propName) =>\n `activepieces:${source.packageName}#${actionName}.${propName}`,\n ),\n ...(action.outputSchema !== undefined\n ? { outputSchema: action.outputSchema }\n : {}),\n ...(action.audience !== undefined ? { audience: action.audience } : {}),\n }),\n );\n\n const triggers = Object.entries(getTriggers(piece)).map(\n ([triggerName, trigger]): PieceTriggerDescriptor => ({\n name: trigger.name ?? triggerName,\n displayName: trigger.displayName ?? triggerName,\n description: trigger.description,\n strategy: trigger.type ?? \"UNKNOWN\",\n testStrategy: trigger.testStrategy,\n requireAuth: trigger.requireAuth ?? false,\n props: describeProperties(\n trigger.props,\n (propName) =>\n `activepieces:${source.packageName}#${triggerName}.${propName}`,\n ),\n ...(trigger.outputSchema !== undefined\n ? { outputSchema: trigger.outputSchema }\n : {}),\n hasSampleData:\n trigger.sampleData !== undefined && trigger.sampleData !== null,\n ...(trigger.sampleData !== undefined && trigger.sampleData !== null\n ? { sampleData: trigger.sampleData }\n : {}),\n handshake: describeHandshake(trigger),\n ...withUnsupported(unsupportedTrigger(trigger)),\n }),\n );\n\n const descriptor: PieceDescriptor = {\n id: `activepieces:${source.packageName}`,\n source,\n displayName: piece.displayName,\n description: piece.description,\n logoUrl: piece.logoUrl,\n categories: piece.categories,\n minimumSupportedRelease: piece.minimumSupportedRelease,\n maximumSupportedRelease: piece.maximumSupportedRelease,\n actions,\n triggers,\n ...withUnsupported(unsupportedAuth(piece.auth)),\n };\n if (Array.isArray(piece.auth)) return descriptor;\n if (piece.auth && typeof piece.auth === \"object\") {\n // CUSTOM_AUTH carries a record here; a DYNAMIC prop would carry a\n // resolver function, which is not an auth shape at all.\n const authProps =\n piece.auth.props && typeof piece.auth.props === \"object\"\n ? describeProperties(piece.auth.props)\n : [];\n descriptor.auth = {\n type: piece.auth.type ?? \"UNKNOWN\",\n displayName: piece.auth.displayName,\n description: piece.auth.description,\n required: piece.auth.required,\n ...(authProps.length > 0 ? { props: authProps } : {}),\n };\n }\n return descriptor;\n}\n"],"mappings":";;;;;;AAeA,SAAgB,aAAa,UAA0B;CACrD,MAAM,MAAM,aAAa,KAAK,KAAK,UAAU,eAAe,EAAE,OAAO;CACrE,MAAM,MAAM,KAAK,MAAM,IAAI;CAK3B,MAAM,YAAY,IAAI,UAAU;CAChC,MAAM,aAAqC,EAAE;AAC7C,KAAI,OAAO,cAAc,SAAU,YAAW,KAAK,UAAU;AAC7D,KAAI,aAAa,OAAO,cAAc,UAAU;EAC9C,MAAM,OAAO;AACb,OAAK,MAAM,OAAO;GAAC;GAAU;GAAW;GAAU,EAAE;GAClD,MAAM,QAAQ,KAAK;AACnB,OAAI,OAAO,UAAU,SAAU,YAAW,KAAK,MAAM;;;AAGzD,YAAW,KAAK,IAAI,MAAM,IAAI,QAAQ,gBAAgB,YAAY,UAAU;CAG5E,MAAM,OAAO,aAAa,SAAS;CACnC,MAAM,cAAc,OAAO,KAAK;AAChC,MAAK,MAAM,aAAa,YAAY;AAClC,MAAI,CAAC,UAAW;EAChB,MAAM,MAAM,KAAK,QAAQ,UAAU,UAAU;EAC7C,IAAI;AACJ,MAAI;AACF,UAAO,aAAa,IAAI;UAClB;AACN;;AAEF,MAAI,SAAS,QAAQ,CAAC,KAAK,WAAW,YAAY,CAAE;AACpD,SAAO;;AAET,OAAM,IAAI,MAAM,2CAA2C,WAAW;;AAGxE,SAAS,SAAS,OAAkD;AAClE,QAAO,OAAO,UAAU,YAAY,UAAU;;AAKhD,SAAS,UACP,KACkD;CAClD,MAAM,aAAwB;EAC5B,GAA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AC3B;EACA,aAAa,MAAM;EACnB,aAAa,MAAM;EACnB,SAAS,MAAM;EACf,YAAY,MAAM;EAClB,yBAAyB,MAAM;EAC/B,yBAAyB,MAAM;EAC/B;EACA;EACA,GAAG,gBAAgB,gBAAgB,MAAM,KAAK,CAAC;EAChD;AACD,KAAI,MAAM,QAAQ,MAAM,KAAK,CAAE,QAAO;AACtC,KAAI,MAAM,QAAQ,OAAO,MAAM,SAAS,UAAU;EAGhD,MAAM,YACJ,MAAM,KAAK,SAAS,OAAO,MAAM,KAAK,UAAU,WAC5C,mBAAmB,MAAM,KAAK,MAAM,GACpC,EAAE;AACR,aAAW,OAAO;GAChB,MAAM,MAAM,KAAK,QAAQ;GACzB,aAAa,MAAM,KAAK;GACxB,aAAa,MAAM,KAAK;GACxB,UAAU,MAAM,KAAK;GACrB,GAAI,UAAU,SAAS,IAAI,EAAE,OAAO,WAAW,GAAG,EAAE;GACrD;;AAEH,QAAO"}
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { C as EgressPolicy, _ as PieceWorker, a as AttachmentPort, c as ConnectionRequest, d as SecretStore, m as WorkflowRunResult, n as packagePieces, p as StepExecutionRecord, t as PieceRegistry, v as PieceWorkerResult, x as PieceResolver } from "./piece-registry-BH39cD-k.js";
1
+ import { C as EgressPolicy, _ as PieceWorker, a as AttachmentPort, c as ConnectionRequest, d as SecretStore, m as WorkflowRunResult, n as packagePieces, p as StepExecutionRecord, t as PieceRegistry, v as PieceWorkerResult, x as PieceResolver } from "./piece-registry-q4bgYbXa.js";
2
2
  import { ActionBase, TriggerBase } from "@powerhousedao/pieces-framework";
3
3
  import { ILogger, OperationWithContext } from "document-model";
4
4
  import { BaseReadModel, DocumentViewDatabase, IConsistencyTracker, IOperationIndex, IReactorClient, IWriteCache, ReadModelRegistrationStage } from "@powerhousedao/reactor";
@@ -70,6 +70,7 @@ interface PieceSummary {
70
70
  triggerCount: number;
71
71
  categories: string[];
72
72
  auth: unknown;
73
+ unsupported?: string;
73
74
  }
74
75
  interface PieceActionEntry {
75
76
  name: string;
@@ -77,6 +78,7 @@ interface PieceActionEntry {
77
78
  description: string;
78
79
  blockType: string;
79
80
  audience: string | null;
81
+ unsupported?: string;
80
82
  }
81
83
  interface PieceActionsResult {
82
84
  name: string;
@@ -91,6 +93,7 @@ interface PieceTriggerEntry {
91
93
  description: string;
92
94
  strategy: string;
93
95
  blockType: string;
96
+ unsupported?: string;
94
97
  }
95
98
  interface PieceTriggersResult {
96
99
  name: string;
@@ -111,6 +114,7 @@ interface BlockSearchHit {
111
114
  description: string;
112
115
  kind: BlockSearchKind;
113
116
  strategy: string | null;
117
+ unsupported?: string;
114
118
  }
115
119
  type BlockSearchStatus = "ready" | "indexing" | "error";
116
120
  interface BlockSearchResult {